Equation for CAN Bus

Hello
I want to read my car's brake temperature with CAN bus.
I can retrieve the data, but I can't find the equation to get the temperature.

SG_ BrakeTempFL3FE : 0|10@1+ (1,-40) [0|0]
SG_ BrakeTempFR3FE : 10|10@1+ (1,-40) [0|0]
SG_ BrakeTempRL3FE : 20|10@1+ (1,-40) [0|0]
SG_ BrakeTempRR3FE : 30|10@1+ (1,-40) [0|0]

For exemple : Data 34 D0 40 03 0D raw values : 0x34 0x34 0x34 0x34 = 12° 12° 12° 12°
34 D0 40 03 0D -> in little-endian 0D 03 40 D0 34
0000110100 0000110100 0000110100 0000110100
0x34 0x34 0x34 0x34

0x34 = 52 – 40 = 12°C

i tried this one but it doesn't work
BitsToUint ((bytesToUintLe(raw,0,5)),0,10)-40

Comments

  • I wanted to try "bitsToUintLe (raw, 0, 10)"
    the function did not exist yet, I will have to wait for version 7.1 :(
  • Yep, as you noticed, the bitsToUintLe and bitsToIntLe will be in v7.1. They are built for resolving Tesla's CAN-Bus messages.

  • I was also playing around with CANbus stuff on my car (2017 Audi), and people smarter than me had posted info saying it was little endian as well. I found myself looking for this function....good to know it's on the way. I'll give it another go when 7.1 is out.
Sign In or Register to comment.