XML decoding not working correctly

Hello,
Following the latest RealDash update, my DBC (file.xml) is no longer decoding correctly. I have the impression that the bitcount is no longer working and that a length of 8 is being used by default. Here is an example of my XML:

	<frame canId="0x221" endianess="little">  <!--PCS_dcdcRailStatus-->
			<value name="PCS_dcdcRailStatus_PCS_dcdcLvBusVolt" startbit="0" bitcount="10" units="V" endianess="little" signed="false" rangeMin="None" rangeMax="None" conversion="V/25.57544757033248"></value><!--Comment=None-->
			<value name="PCS_dcdcRailStatus_PCS_dcdcHvBusVolt" startbit="10" bitcount="12" units="V" endianess="little" signed="false" rangeMin="None" rangeMax="None" conversion="V/6.825938566552901"></value><!--Comment=None-->
			<value name="PCS_dcdcRailStatus_PCS_dcdcLvOutputCurrent" startbit="24" bitcount="12" units="A" endianess="little" signed="false" rangeMin="None" rangeMax="None" conversion="V/10.0"></value><!--Comment=None-->
		</frame>

PCS_dcdcRailStatus_PCS_dcdcLvBusVolt is 10 bits long, but when I look at the CAN BUS, I get
e.g.: 36F = 0011 0110 1111 = 879
but it only takes 8 bits, so 0011 0110 = 54.
So all the values are no longer correct.
And that is for all my signals

Thank you

Thank you for reporting, I will put your XML to test.

Confirmed, when using startbit and bitcount without length attribute sets the length to 1 when parsing XML file. This bug was introduced with update to latest tinyxml2.

Temporarily, you can fix this by adding length=“2” to your values. This will be fixed in next release.

1 Like