I’m trying to write the XML to map the turn indicators. The car (2011 Corsa D) also has ‘comfort’ indicators - the three flash thingy, so there are two values for each side. Sniffing the HS-CAN activity, I can see the indicators toggling bits on 0x361 in the top nibble of the first byte. So:
0010 xxxx Left comfort indicator on
0100 xxxx Right comfort indicator on
0110 xxxx Left indicator ON
1000 xxxx Right indicator ON
How do I write the XML so that either comfort OR ON lights up the dashboard icon?
I have tried shifting the bits right and bitwise ANDing with the appropriate values:
<value targetId=“160” offset=“0” length=“1” units=“bit” conversion=“((V >> 4) & 2) || ((V >> 4) & 6)”>
<value targetId=“161” offset=“0” length=“1” units=“bit” conversion=“((V >> 4) & 4) || ((V >> 4) & 8)”>
but I don’t get expected behaviour. I’m guessing my syntax may be wrong.
As a side note, if anyone has a reliable source for (UK) 2011 Corsa D CAN IDs for basic stuff and/or the CAN XML for them, that would be great. I’m not bothered about the technical stuff like IAT/ AFR etc, more just like general instrument panel indicators and readings. Co-pilot just makes stuff up and there is a lot of conflicting info on the web!