I’m trying to translate proprietary PIDs from Torque into AutoPi. The Torque data looks like this:
Auxiliary Battery Voltage | Aux_Batt_V | 0x21cf | (0.2 * D) - 25.6 | 0 | 15 | Volt | 7.00E+03 | 1
The important parts here are the PID (21CF) and the formula ((0.2 * D) - 25.6).
When I query mode 21 and code CF I get an 18-long bytearray as expected. The Torque documentation says they label the byes alphabetically so D should indicate the byte at index 3. This should read the voltage of my 12V battery. I’ve tried this formula:
(0.2*message.data)-25.6 but the result I’m getting back is not in line with my 12V battery voltage. I went through every byte in the array with this formula and index 5 is the only one that returns a sane value but it’s always exactly 14 which I don’t believe is correct.
Here is the full output of 7DF#21CF from the PID Tester:
1:7EB 10 12 61 CF 88 68 80 C6 2:7EB 21 56 AA 00 08 00 00 88 3:7EB 22 68 89 02 89 1A 00 00
Here is the data I’m working with exported from Torque: https://docs.google.com/spreadsheets/d/1oB6wQ5meok-nIg8XHSolNO3ALThMxrZb5LmqvAVadp8/edit?usp=sharing
Let me know if I can provide additional information.