View Single Post
      12-07-2012, 10:34 AM   #31
ilhan1103
1
Private First Class
 
ilhan1103's Avatar
 
Drives: f30 318 2012
Join Date: Oct 2012
Location: Belgium

Posts: 170
iTrader: (0)

Garage List
2012 318D  [0.00]
2010 Golf 1.6  [0.00]
Quote:
Originally Posted by Frogman View Post
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.


Here you go the comment from that value:

Abhangig von der Farbe der Innenausstattung kann die Helligkeit der Ambienteumfange eingestellt werden.
0: 0%, 100:100%

it specifically states value0 stands for 0% and 100 stands for 100%
Since I'm checking something for Shawn later this evening i'll include this in the test. Lets see how it does at value 0 (eg 0% as per my understanding)
ilhan1103 is offline  
Appreciate 0
Reply With Quote