Notices
ECU Flash

ECUFlash Scaling

Thread Tools
 
Search this Thread
 
Old Feb 6, 2009 | 12:53 PM
  #1  
03whitegsr's Avatar
Thread Starter
Evolved Member
iTrader: (8)
 
Joined: Nov 2006
Posts: 4,001
Likes: 17
From: Utah
ECUFlash Scaling

I've tried to avoid writing any of my own scaling as I've been a little unsure about a few things.

First off, when you write a scaling parameter, do you need have your "inc" value be a multiple of your scaling? (i.e. 1 bit increment = 1 increment in number form)

Secondly, is the displayed value a truncated value or a rounded value?

Third, why are most toexpr/frexpr reciprocals but a few others are not? Primarily the AFR and InjectorScaling (that was part of the xml from the v1.4 of ECUflash) where the toexpr and the frexp are identical.

Finally, do the max/min values actually limit the range you can input or is it just used for the map color scaling?

Last edited by 03whitegsr; Feb 6, 2009 at 01:42 PM.
Reply
Old Feb 6, 2009 | 01:08 PM
  #2  
l2r99gst's Avatar
Evolved Member
iTrader: (2)
 
Joined: Mar 2004
Posts: 3,499
Likes: 4
From: CA
I knew the answers to all of these, but would have to double check and don't want to give the wrong information.

But, for your #3:

The to and from expressions are just relationships of the data in the ROM to your display and then from the display back to your ROM.

Any 1/x relationship is going to be the same to and from.

For example, y=1/x
To find in terms of x, x=1/y

If your to display is x-40, your from is x+40
y=x-40, x=y+40

That might help you think about it a bit easier.
Reply
Old Feb 6, 2009 | 01:34 PM
  #3  
03whitegsr's Avatar
Thread Starter
Evolved Member
iTrader: (8)
 
Joined: Nov 2006
Posts: 4,001
Likes: 17
From: Utah
Ha, yeah, now that I just thought about it, it's pretty obvious that it's right. It just didn't look right as most others are an inversion because as you said, they often have offsets. Where that particular one already is a reciprocal...

I need to go through all my scaling values and make sure they convert back and forth correctly.

Last edited by 03whitegsr; Feb 6, 2009 at 01:42 PM.
Reply
Old Feb 6, 2009 | 01:46 PM
  #4  
03whitegsr's Avatar
Thread Starter
Evolved Member
iTrader: (8)
 
Joined: Nov 2006
Posts: 4,001
Likes: 17
From: Utah
One additional question, what is the difference between "int8" and "uint8"?

int8 seems to turn bit values >128 into negative numbers with 255=-1 and 129 = -127

uint8 seems to just be 0-255
Reply
Old Feb 6, 2009 | 05:56 PM
  #5  
Deepnine's Avatar
Evolving Member
iTrader: (4)
 
Joined: Apr 2008
Posts: 186
Likes: 0
From: Germany
unit = unsigned integer = only positive numbers from 0-254
int = integer = positive and negative number from -127 to +128
Reply
Old Feb 6, 2009 | 10:47 PM
  #6  
codgi's Avatar
Evolved Member
20 Year Member
Photogenic
Liked
Loved
Community Favorite
iTrader: (22)
 
Joined: Aug 2004
Posts: 2,493
Likes: 41
From: Seattle, WA
Originally Posted by 03whitegsr
One additional question, what is the difference between "int8" and "uint8"?

int8 seems to turn bit values >128 into negative numbers with 255=-1 and 129 = -127

uint8 seems to just be 0-255
What Deepnine said. Signed ints using 2 complements representation:

http://en.wikipedia.org/wiki/Two%27s_complement

That's the phenomena you are seeing above. You can use "calc" to see it better.

Put in -1 in Decimal mode and change it to binary, you get a row of 1s right? Now put in 255 also in decimal mode and change it to binary another row of 1s right? We tell the computer how to interpret bits so depending on the interpretation that row of 1s can mean 255 or it can mean -1.
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
tephra
ECU Flash
226
Oct 18, 2025 06:25 AM
tephra
Evo X Engine Management / Tuning Forums
57
Dec 23, 2023 09:14 AM
mrfred
ECU Flash
1088
Dec 15, 2022 11:13 AM
mrfred
ECU Flash
264
Nov 30, 2018 02:08 AM
richardjh
ECU Flash
25
Jul 28, 2017 03:49 PM




All times are GMT -7. The time now is 04:25 PM.