Can TunerPro RT work with a signed byte?
Moderators: Mangus, robertisaar, dex
Can TunerPro RT work with a signed byte?
I need to be able to tell an equation that a byte is signed such that FF == -1, FE == -2, FD == -3 etc. Right now it's seeing them as 255, 254, 253, etc... Can Tunerpro RT work with a signed byte?
The cell uses two bytes of data to represent the value. The first byte is the decimal value and the second byte is the multiplyer. The first byte isn't signed but the second is. The formula that works for positive values is ((X>>8)*(10/64))/10)+(4*(A&0xFF)). The formula that I need would be: (((X>>8)*(10/64))/10)+(4*(signed(A&0xFF))).
If this is for a table, then you would use a table for the auxiliary value instead of a scalar. You can also get the functionality you need using functions. See "General Conversion Editor" in the docs for the list of functions and parameters that you can use in your conversion equations.
***************************************
TunerPro Author
1989 Trans Am
TunerPro Author
1989 Trans Am
It desn't work. The problem is that I need to deal with both a signed byte and an unsigned byte in the same equation. This is for a Ford diesel timing map. Each value is represented by two separate bytes that are right next to each other in the bin. The first byte is unsigned and represents decimal values between 0 and 3.98. The second byte is signed and represents positive and negative values in multiples of 4. For example, 2.5 + -4 = -1.5 and 3.5 + 4 =7.5. I set up a separate map to handle the signed byte, but the equation for the unsigned byte overrides the signed value and just sees the raw, unsigned hex value. I can't get both signed and unsigned to work together. The conversion treats every byte as signed or every byte as unsigned with no regard as to how the values are fed to it.
There are several ways to do this, given the flexibility outlined in the doc I referenced in my last reply. Send me your XDF and a bin, The address and size of the table, and examples of what the result should look like. I'll take a look when I have some time to spare for it.
***************************************
TunerPro Author
1989 Trans Am
TunerPro Author
1989 Trans Am