Help with conversion of scanned value in .adx

Discuss anything TunerPro related.

Moderators: Mangus, robertisaar, dex

Post Reply
hnracing
Posts: 23
Joined: Sun May 30, 2010 8:43 am

Help with conversion of scanned value in .adx

Post by hnracing »

Hi,

Need some help to get the conversion right for a scanned value in my .adx.

AA) When I ask the ECU for the TPS value the ECU answer back with a 8 bit value = X. (0<= X <= 255)
The conversion of the value should be
for X < 171
TPS = X*0.1848-1.41
and for X > 170
TPS = X*0.7058-90

How should I implement the conversion ?

BB) When I ask the ECU for the injector duration i have to ask two questions.
Question A for the MSB part of the value and
Question B for the LSB part of the value.
The conversion is then 16bit value * 2 for the injector duration.
I tried with
answer A * 256
(Answer B + (linked value from answer A))*2

But it gives me some lag.
Is there any other way to do the converison ?

/Hnerik
hnracing
Posts: 23
Joined: Sun May 30, 2010 8:43 am

Post by hnracing »

Tried a couple of different things.
For AA) I used a lockuptable. Worked since it was two linear funtions.
For BB) I made another value for the MSB part that I linked to the value for the LSB.

Tried to make a value with an output of 1 or 0 as integer.
And used it linked in another value.
But that did not work because in the other value the linked value were used as floating. 1,12 instead of 1 and 0,85 instead of 0.
Do not know why ?!

/Henrik
Post Reply