View Single Post
      12-06-2012, 01:58 AM   #25
Lieutenant Colonel

Frogman's Avatar
Drives: 2012 F30 328i
Join Date: Mar 2012
Location: SoCal

Posts: 1,775
iTrader: (0)

Originally Posted by ilhan1103 View Post
I could be wrong but i think the comment of that value stated its in percentages and not real hex decimals. I'll check tonight when I have the system with esys available
Yes, the comment says 0 to 100 percent.

Since this is a comment that is meant to be read by a human, it's assumed to be in decimal not hex. When programmers wants to indicate a hex value in comments/documentation, we either write 0x64, or 64h so that there isn't any confusion.

But since you can only enter these kind of values in hex, you have to convert 100 (decimal) to hex (64h) before you enter it.

The value range you can store in these 1-byte variables is from 00h (0) to FFh. (255 decimal).

Storing 99 in the hex value would results in a decimal value of 153; probably not what you want to store the percentage as. I have no idea what the ECU would do with that value.

Make sure you know how to convert between decimal and hex or else you will end up programming the wrong values into the ECU's.