Trouble Extracting Warning Light Bits

Hey there

Having trouble Extracting the Bits out of a Byte for certain warning Lamps

Currently trying to do the Turn Signals on a VW Amarok.

Have tried using Target IDs as well as Value Names but cant seem to get it to work.

The Value sits at 0x01, Changes to 0x09 for left and 0x11 for Right, Current Code sits as:

<frame id="0x392">
		<value name="VW Amarok Turn Left" units="bit" offset="1" length="1" enum="09:1,#:0"></value><!--Indicator Left-->
    <value name="VW Amarok Turn Right" units="bit" offset="1" length="1" enum="17:1,#:0"></value><!--Indicator Right-->

Any help would be greatly appreciated

By specifying units=“bit” will take the least significant bit from the values, enum will only see 1 or 0, in reality should only see 1 as bit 0 seems to be set for all three conditions, looks like bit 3 (8) is left and bit 4(16) is right, try deleting units=“bit”

You could also use startbit and bitcount=1 with units=“bit” instead of offset and length (and enum)

if offset = 1 then this is byte 1

name=“left” startbit=“11” bitcount=“1” units=“bit”
name=“right” startbit=“12” bitcount=“1” units=“bit”

Thank you!

The Bitcount worked, I think I have a better understanding of how bitcount functions now.

I was also able to get them to work by this code

However that doesnt allow them to flash when the hazard lights are on, So I opted for the Bitcount route.

Glad to hear this worked, you may also consider using the targetId instead of setting your own name for these values, this way your signals align with other dashboards

targetId=“160” is turn left and targetId=“161” is turn right

I did change them back to the default target IDs, the custom IDs was so I could see if it was working under custom mapping.

Now its onto getting custom OBD2 PIDS…Yay…