[Ovmsdev] Nissan Leaf updates

Tom Parker tom at carrott.org
Sun Apr 22 17:55:13 HKT 2018


On 21/04/18 07:14, Robin O'Leary wrote:

> About 0x5c0:
>> You changed the flag check from d[0] == 0x40 to (d[0]>>6) == 1,
>> I'm just staring at CAN bus captures and on the car's I've seen, the 0x40
>> test works but I'm happy to change if there is even a trivial reason to
>> change, do you have any insight into which test is better?
> Well, I think it's always best to make this kind of multiplex index
> matching as narrow as possible, in case there is something else going
> on in the adjacent bits that we don't yet know about.  I do have a few
> logs where bits 0--3 have interesting values, but even though I've only
> ever seen bits 4 and 5 as zero, it doesn't seem wise to assume that when
> matching the index.
>
> It sometimes happens near the end of a charging session (SOC > 90%),
> when (d[0]>>6)==1 or 2, the values in (d[0] & 0xf) climb independently
> from 0 to 10 over a period of about a minute, stay at 10 for the
> rest of the session, then reset back to 0.

Seeing the other bits being used for something unrelated to the mux is a 
really good reason to change it! Thank you for noticing this obscure 
detail in my code!



More information about the OvmsDev mailing list