I thought I would have ago at tracking steering wheel angle, and plotting it on a bar graph, however I only seem to be able to get positive values and wondered if it’s due to my Gauge Math
Looking at the can data, the most significant bit isn’t changing when the wheel passes 0 into the negative/positive so I don’t think it’s a signed value, it looks like a 15bit number.
Unfortunately that wouldn’t work, as if the ‘Steering Direction’ is 0 multiplying 0 by -1 would still equal 0 and for the value of 1 it would reverse the value, but now showing the wrong direction.
I’m now trying some combinations using the XML, I think I have found a few bugs though
When importing the XML it doesn’t seem to fully update the custom values, you have to clear the value in units and values before importing the new XML file.
Now I have a clean import, I removed the units and enum for a single bitcount when I add the “custom value” into the conversion, the debug windows stops showing the converted number, so for example a value in steering angle of 0 will show 32768
This returns 32768 for 0 then an increasing number in either direction, I would expect CCW to be multiplied by 0 at least???
So looks like a number of issues? What do you need from the to help resolve this?
The conversion I need would be;
…
Conversion=“(V & 0x7FFF) * 0.04395 * (’RS: Steering Wheel Direction’*2-1)”
…
Where V is masked for 15bit
Multiplied by the factor 0.04395
= positive degrees (d)
Then multiply d by (either 0 or 1 multiplied by 2 and then -1)
…
So; 200 degrees * (0 * 2 - 1) = -200
This is by design. Custom values are never removed automatically.
Hmm, I have a faint memory that we recently fixed something related to using custom values in conversion attribute. I’m not sure if that fix is yet on public version.
But they dont update fully either, for example when I removed the unit “bit” the value then only showed 1 and it didnt update when the data changed, after I removed it manually then re-imported the XML the value then showed as 1.0 and was showing the correct value