Values for XML file

I have two formulas that I can’t find the solution for:

1st →

From this CANBUS input, I need the value 0=0, and when it’s >=1 the value is 1 (in the Target ID)

2nd

This all works for me except (-2:P)
I need it to be P when the input signal is (0 + (a BIT is active in a different BYTE))

To summarize, the problem is that in the Real Dashboard, “N” appears on the screen instead of “P” because the “P” is activated in a different bit.

  1. Use units=“bit” and bit shift for the >= 1 value.
  2. If value is in same frame, you can read and use it on ‘conversion’ attribute. If value comes from different frame, you can refer to it by ID or by name in the conversion. See documentation here:

RealDash-extras/RealDash-CAN/realdash-can-description-file.md at master · janimm/RealDash-extras

The first query is already resolved.

The second query is for the same frame. But I don’t know how to do it with conversion.

I have this:
value name=“Current Gear” offset=“0” length=“1” signed=“true” conversion=“V-‘Parking’” enum=“-2:P,-1:R,0:N,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8”/

value name=“Parking” offset=“4” length=“1” signed=“true” units=“bit” conversion=“V>>2” enum=“0:0,1:-2”/

This works perfectly, but (-2:P) doesn’t work.

The “Parking” value is -2 when the gear is in Park. I think the problem is here:

conversion=“V-‘Parking’”

If it’s not in Park, the gear value would be -0.
And if it’s in Park, it would be 0-2.

If I type the following, the P for parking appears without a problem.

value name=“Current Gear” offset=“0” length=“1” signed=“true” conversion=“V-2’” enum=“-2:P,-1:R,0:N,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8”/

I already managed to do it,
Thanks

1 Like