Airbag detection CAN help

I’ve managed to decode many values for my BRZ but I’m stuck on how to implement one of them.

The airbag value changes a few times a second, the airbag light in the car only comes on when there is no change in value for an extended time.

As long as the airbag is pushing varied frames, the light is off. Once it stops sending new frames, the light turns on.

I’m not sure how to implement this within RealDash or whether I need to apply a conversion in my XML.

0x372: 00 XX 00 00 00 00 00 00

<frame id="0x372">
  <value name="BodyInfo_Airbag" offset="1" length="1"/>
</frame>

Byte “XX” randomly changes each of the last 4 bits between 1 and 0 (eg: 11110000, 00000000, 11010000, 00110000 etc)

This cannot be done with connection XML alone, but its possible with triggers and actions. Not super easy, though.

  • Make a new global trigger ‘Airbag check’

  • Trigger when “BodyInfo_Airbag” ‘Value Changes’

  • Attach new action that resets a dummy timer, say timer 10 (Set Value to 0)

  • Make another global trigger, ‘Airbag timer check’

  • Trigger when dummy timer is greater than 5 seconds

  • Attach new action that sets Body->Airbag Warning Light with ‘Set to trigger status’