[Ovmsdev] What does CarOn mean?
nshishkov at yahoo.com
Mon Jun 16 21:42:12 HKT 2014
With some help I found a message on the canbus that reflects the status of the "Ready" light in the car.
Please note that the key position may be in "on", that does not mean that the car can drive. I have seen this behavior (the switch is on, but then it takes half second and the car is "ready", most of the time) in the old RAV4 EV, Nissan Leaf, the Mitsubishi Miev trio of cars, Think City EV.
I don't remember how it works in the Roadster or the Model S.
So if no one minds I will be setting the CarON when the "Ready" bit is set in that CANBus message.
Can someone please confirm that my code will extract the correct bit - I think I got it right, but sometimes I confuse the zerobased indexing and the endianness of a system.
The CAN bus message id is 0x424 -
Here with ready OFF:
424 43 00 08 00 00 AE 01 FF And here with ready ON:
424 43 00 0C 00 00 AE 01 FF
So I am looking for the the 3rd bit in the 3rd byte of the message and I am thinking of doing something like this:
car_doors1bits.CarON = can_databuffer & (1<<2);
car_doors1bits.CarON = can_databuffer & 4;
Is this correct?
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. If the state of the ignition switch is not readable on the bus, the vehicle not being in 'P' gear or handbrake not appied (and not charging), would be acceptable. Regards, Mark. On 15 Jun, 2014, at 9:38 pm, Nikolay Shishkov <nshishkov at yahoo.com> wrote: >As the subject says - what does CarOn mean? Is it key in position 3, or car in "Ready" state? Or something even more remote like shifter not in "P"? >>Nikolay
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OvmsDev