Troubles mapping phisical buttons

Hello, i’m trying to map two real buttons to steering button 1 and 2, i can see the bits change in the can monitor, but doesnt work on the dash, i create a texto gauge to see if 0 changes to 1, but It doesnt.



They are in the marked byte, bit 4 and 5. One photo is one button, and the other photo, the other button.

This is my XML:
value targetId=“188” offset=“3” startbit=“4” bitcount=“1”
value targetId=“189” offset=“3” startbit=“5” bitcount=“1”

Other indicators in that frame like indicators, lights or door state, works fine
Thanks

Based on your images, startbit should be 2 and 3. You count the bits right to left, first bit being bit 0.

Also, add length=“1”, just in case, so only that byte is read for the value.

targetId="188" offset="3" length="1" startbit="2" bitcount="1"
targetId="189" offset="3" length="1" startbit="3" bitcount="1"
1 Like

Ok, that worked, i’m trying to map Torque demand, It’s in the bytes 0 and 1, but only has 12 bits, not 16, byte 0 complete, and from byte 1, positions 7 6 5 and 4 bits. My car uses big endian.
Is correct: startbit=“7” bitcount=“12” ?
I’m learning, this from 0, sorry if It sounds so basic.

Thanks for the support.

Try reading full 16 bits in big endian, and then use bitmask to process only 12 bits:

offset="0" length="2" endianness="big" conversion="V & 0xFFF"

Sorry to say It doesnt’t work, but v>>4 did the job.
Thanks for the support, i bought a one year license to use the debug data view and other utilities, It makes It easier

1 Like