help: how to manage warning lights, fixed and blinking

Good morning everyone,

i’m trying to customize the “Pole Position” dashboard for my needs. I’ve reverse engineered a big part of the CAN-Bus of my Mazda MX5 and now I’m working on the warning lights of the instrument cluster.

I see that Real Dash provides target IDs for:

parking brake
engine light
ABS warning light
Battery light

To these I want to add:
DSC off
TSC off (malfunctioning)
TSC blink (when in operation)
ABS blink (when in operation)

For ABS fixed light the CAN-Bus is changing one bit of Byte 4 of id 212, that is going from 0000000 to 0001000, while the blinking light is 0010000

First question: is the “startbit” working as the offest? fom left to right, the left most bit is startbit=“0”?

my idea is to use these lines in the XML file:

<frame baseId="0x212">
<value targetId="237" offset="4" startbit="3" bitcount="1"></value> <!-- pointing to ABS warning -->
<value targetId="93" offset="4" startbit="2" bitcount="1"></value> <!-- pointing to dummy, ABS blink-->
</frame>

Then I’ll copy one of the existing warning lights in the Dashboard, change the image to reflect the ABS symbol and I’ll use it as the fixed warning light, that is on when there is a fault in the ABS system

For the blinking light: can I copy the same indicator on top of itself, just pointing to another ID?

Next: for DSC and TSC I’ve to use only the dummies, because there are no associated IDs, correct?

All the TSC and DSC are again in Byte 4 of id 212.
TCS Constant is 00000100
TCS Blink is 00001000
DSC OFF Constant 00000001. In this case the light is off when the system is on, so the warning level will be when below 1.

So the xml will look like:

<frame baseId="0x212">
<value targetId="237" offset="4" startbit="3" bitcount="1"></value> <!-- pointing to ABS warning -->
<value targetId="93" offset="4" startbit="2" bitcount="1"></value> <!-- pointing to dummy, ABS blink-->
<value targetId="94" offset="4" startbit="5" bitcount="1"></value> <!-- pointing to dummy: TSC constant-->
<value targetId="95" offset="4" startbit="4" bitcount="1"></value> <!-- pointing to dummy: TSC blink -->
<value targetId="96" offset="4" startbit="7" bitcount="1"></value> <!-- pointing to dummy: DSC OFF -->
</frame>

For the DSC OFF I’ll add a static text with dynamic color, background color normally, red when below 0.9
Will this work?

thank you!

I think you have a right idea on everything. Please note that ABS light targetId is 273, not 237.

For the TCS, as there are no built-in targetId for that, you could use custom value. Use

name="Mazda MX5: TCS Light"

instead of ‘targetId’. This will create new input into the ‘ECU Specific’ category.

Thanks. Can you please confirm the bit order?

I’m testing the handbrake. I edited the existing indicator for the parking brake but pointed to a specific ECU name.

In this case frame 0x39A is changing from
00 00 00 00 00 00 00 00 (no handbrake)
to
08 00 00 00 00 00 00 00 (handbrake)

meaning in MSB notation 00000000 to 00001000

So my xml looks like

<frame baseId="0x39A">
  <value name="Mazda MX5: parking brake" offset="0" startbit="4" bitcount="1"></value> <!-- pointing to parking brake-->
</frame>

And the indicator is ponting to these input and values

The color of image blending indicator is set to red for warning and critical… Still nothing is happening when I use the hand brake.

I’m on Android and OBDLink LX

In that case I would prefer:

<frame baseId="0x39A">
  <value name="Mazda MX5: parking brake" offset="0" length="1" units="bit" conversion="V>>7"></value>
</frame>

Thanks, and what about the ABS / TSC lights that are all encoded in the same byte?

something like:

<frame id="0x212">
  <value name="Mazda MX5: ABS Light" offset="4" length="1" units="bit" conversion="V>>3" ></value> 
  <value name="Mazda MX5: ABS Blink" offset="4"  length="1" units="bit" conversion="V>>2" ></value>
  <value name="Mazda MX5: TSC constant" offset="4" length="1" units="bit" conversion="V>>5"></value>
  <value name="Mazda MX5: TSC blink" offset="4" length="1" units="bit" conversion="V>>4"></value>
  <value name="Mazda MX5: DSC light" offset="4" length="1" units="bit" conversion="V>>7"></value>
</frame>

If they all are encoded in first byte, then offset (0) and length (1) remain the same on all values. Only the conversion changes.