[Ovmsdev] Android App
Mark Webb-Johnson
mark at webb-johnson.net
Wed Jan 30 08:29:24 HKT 2013
Michael,
> my parktime is always 0, as I currently have no parking detection, but the App shows it as parking.
> It shows "just now" most of the time (also right now), but I also saw some "x minutes" displays there. doors1 bit7 is set correctly by the Twizy.
I think the best way is for you to add support for car_doors1 [bit 7] and [bit 6] (the 'car on' and 'park' bits).
Because your firmware is always saying 'car off' (car_doors1 [bit 7] unset), the apps will think it is parked. And, as the parking timer is not coded, the apps will also think 'parked just now'.
The Apps don't use parktime to determine whether the car is parked or not, they use car_doors1 [bit 7] (whether the car is ON of OFF).
> The USSD code entry only allows digits, at least "*" and "#" also need to be allowed.
OK.
Regards, Mark.
On 30 Jan, 2013, at 12:10 AM, Michael Balzer wrote:
> Mark,
>
> my parktime is always 0, as I currently have no parking detection, but the App shows it as parking. It shows "just now" most of the time (also right now), but I also saw some "x minutes" displays there. doors1 bit7 is set correctly by the Twizy.
>
> I found the joystick now, that could have passed as a "hidden" feature ;-)
> The USSD code entry only allows digits, at least "*" and "#" also need to be allowed.
>
> Regards,
> Michael
>
>
>
> Am 29.01.2013 02:37, schrieb Mark Webb-Johnson:
>>
>>> - constantly shows "parking", although the Twizy does not feed the parking timer
>>
>>
>> I just tested on my Roadster, with both Android and iOS Apps, and this seems to work as it should (for me).
>>
>> The logic in the Apps is that the car is parked if "!carstarted and parktime>0".
>>
>> Carstarted is:
>> unsigned char car_doors1 [bit 7]
>>
>> A bit used to signal whether the car is turned on or off. Set to 1 if the car ignition switch is ON, otherwise 0.
>>
>>
>> There is a little bit of code in the vehicle_voltampera to handle the parking timer. As we don't know the 'car on' signal for the Volt/Ampera, yet, we just use the gear selector PARK.
>>
>> else if ((CANctrl & 0x07) == 5) // Acceptance Filter 5 (RXF5) = CAN ID 135
>> {
>> if (can_databuffer[0] == 0)
>> { // Car is in PARK
>> car_doors1 |= 0x40; // NOT PARK
>> car_doors1 &= ~0x80; // CAR OFF
>> if (car_parktime == 0)
>> {
>> car_parktime = car_time-1; // Record it as 1 second ago, so non zero report
>> net_req_notification(NET_NOTIFY_ENV);
>> }
>> }
>> else
>> { // Car is not in PARK
>> car_doors1 &= ~0x40; // PARK
>> car_doors1 |= 0x80; // CAR ON
>> if (car_parktime != 0)
>> {
>> car_parktime = 0; // No longer parking
>> net_req_notification(NET_NOTIFY_ENV);
>> }
>> }
>>
>> Also, initialise car_time to zero, and increment it in the vehicle ticker1().
>>
>>>> ...as well as all the new function and parameter settings.
>>> I haven't seen a function call / parameter setup utility -- is that a hidden feature, or no UI yet, or a bug on my device?
>>
>>
>> The icon is not ideal at the moment. Go to settings, then the little pencil icon to go to the car settings, then press the icon that looks like a joystick in the top right. That is the control menu. From there, we have Features and Parameters.
>>
>> Regards, Mark.
>>
>> On 24 Jan, 2013, at 10:29 PM, Michael Balzer wrote:
>>
>>> Mark,
>>>
>>> a short report for my HTC Desire HD / Android 2.3.5:
>>
>>
>>
>> _______________________________________________
>> OvmsDev mailing list
>> OvmsDev at lists.teslaclub.hk
>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>
> --
> Michael Balzer * Paradestr. 8 * D-42107 Wuppertal
> Fon 0202 / 272 2201 * Handy 0176 / 206 989 26
> <dexter.vcf>_______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20130130/6800fe66/attachment.htm>
More information about the OvmsDev
mailing list