Yes, the target gear is still a positive number. It represents the gear the trans will shift to once MShift has control in the forward gears. In P, N, and R MShift is not controlling the target gear, it is just mirroring the gear lever position. So the target gear should be 1 under these conditions, because that is likely the gear you want once you shift to a controlled (i.e. forward) gear. It shouldn't really jump to -1, but it will do that if there are any gear lever errors such as the fan issue you mention (or remaining bugs in the code).
Code: Select all
[OutputChannels]
; These are from the outpc. structure in the main.c file of the source code
; the size and format are the same as above
deadValue = { 0 } ; Convenient unchanging value.
ochBlockSize = 72
#if CAN_COMMANDS
;full version that works anywhere
ochGetCommand = "r\x01\x07%2o%2c"
#else
ochGetCommand = "a\x00\x06"
#endif
seconds = scalar, U16, 0, "sec", 1.000, 0.0
#if SI_LENGTHS
speedo = scalar, U16, 2, "kph", 0.16093, 0.0
odometer = scalar, U32, 4, "km", 0.00161, 0.0
#else
speedo = scalar, U16, 2, "mph", 0.100, 0.0
odometer = scalar, U32, 4, "miles", 0.001, 0.0
#endif
auto_mode = scalar, U08, 8, " ", 1.000, 0.0
downbutton = bits, U08, 9, [0:0]
upbutton = bits, U08, 9, [1:1]
downshift_request = bits, U08, 9, [2:2]
upshift_request = bits, U08, 9, [3:3]
error = scalar, U08, 10, " ", 1.000, 0.0
serialComm = bits, U08, 10, [0:0]
CAN error = bits, U08, 10, [1:1]
revshiftblock = bits, U08, 10, [2:2]
VSSreset = bits, U08, 10, [3:3]
VSSerr = bits, U08, 10, [4:4]
gearRangeErr = bits, U08, 10, [5:5]
lowVolts = bits, U08, 10, [6:6]
noBrake = bits, U08, 10, [7:7]
manual_gear = scalar, S08, 11, " ", 1.000, 0.0
current_gear = scalar, S08, 12, " ", 1.000, 0.0
target_gear = scalar, S08, 13, " ", 1.000, 0.0
engine_rpm = scalar, U16, 14, "rpm", 1.000, 0.0
#if LOAD_KPA
LOAD = scalar, S16, 16, "kpa", 0.100, 0.0
#else
LOAD = scalar, S16, 16, "%", 0.100, 0.0
#endif
#if CELSIUS
clt = scalar, S16, 18, "ºC", 0.055556, -320.0
#else
clt = scalar, S16, 18, "ºF", 0.100, 0.0
#endif
#if SI_LENGTHS
linepressure = scalar, S16, 20, "bar", 0.00689, 0.0
#else
linepressure = scalar, S16, 20, "psi", 0.10, 0.0
#endif
lock_TCC = scalar, U08, 22, " ", 1.000, 0.0
brake = bits, U08, 23, [0:0]
burnstatus = bits, U08, 23, [1:1]
FWD = bits, U08, 23, [2:2]
forceUP = bits, U08, 23, [3:3]
forceDWN = bits, U08, 23, [4:4]
JakeBrake = bits, U08, 23, [5:5]
#if LOAD_KPA
LOAD_short = scalar, U16, 24, "kpa", 0.100, 0.0
#else
LOAD_short = scalar, U16, 24, "%", 0.100, 0.0
#endif
aux_volts = scalar, U16, 26, "V", 0.001, 0.0
PC_duty = scalar, U08, 28, "pct", 1.000, 0.0
slip = scalar, U08, 29, "pct", 1.000, 0.0
dbug = scalar, U16, 30, " ", 1.000, 0.0
In1adc = scalar, U16, 32, "volts", 0.00488, 0.0
In2adc = scalar, U16, 34, "volts", 0.00488, 0.0
In3adc = scalar, U16, 36, "volts", 0.00488, 0.0
solst = scalar, U08, 38, " ", 1.000, 0.0
Output1 = bits, U08, 38, [0:0]
Output2 = bits, U08, 38, [1:1]
Output3 = bits, U08, 38, [2:2]
Output4 = bits, U08, 38, [3:3]
Output5 = bits, U08, 38, [4:4]
Output6 = bits, U08, 38, [5:5]
Output7 = bits, U08, 38, [6:6]
Output8 = bits, U08, 38, [7:7]
chcksum = scalar, U08, 39, " ", 1.000, 0.0
mileage = scalar, U16, 40, "mpg", 0.010, 0.0
FuelAdj = scalar, S16, 42, "%", 0.100, 0.0
SpkAdj = scalar, S16, 44, "°", 0.100, 0.0
IdleAdj = scalar, S16, 46, " ", 1.000, 0.0
SprAdj = scalar, S16, 48, " ", 1.000, 0.0
In1 = bits, U08, 50, [0:0]
In2 = bits, U08, 50, [1:1]
In3 = bits, U08, 50, [2:2]
In4 = bits, U08, 50, [3:3]
sp1PWM = scalar, U08, 51, "%", 1.000, 0.0
is_rpm = scalar, U16, 52, "rpm", 1.000, 0.0
butADC = scalar, U16, 54, "volts", 0.00488, 0.0
sp2PWM = scalar, U08, 56, "%", 1.000, 0.0
TCC_count = scalar, U08, 57, "sec", 0.100, 0.0
sp0PWM = scalar, U08, 58, "%", 1.000, 0.0
sp09inx = scalar, U16, 59, ""' 0.100, 0.0
sp016inx = scalar, U16, 61, ""' 0.100, 0.0
ms2tps = scalar, U08, 63, "", 1.000, 0.0
LED1 = bits, U08, 64, [0:0]
LED2 = bits, U08, 64, [1:1]
LED3 = bits, U08, 64, [2:2]
LED4 = bits, U08, 64, [3:3]
dbugout7 = scalar, U08, 65, "", 1.000, 0.0
dbugout6 = scalar, U08, 66, "", 1.000, 0.0
dbugout5 = scalar, U08, 67, "", 1.000, 0.0
dbugout4 = scalar, U08, 68, "", 1.000, 0.0
dbugout3 = scalar, U08, 69, "", 1.000, 0.0
dbugout2 = scalar, U08, 70, "", 1.000, 0.0
dbugout1 = scalar, U08, 71, "", 1.000, 0.0
; pageSize = 71 + U08 = 72
So VSS (= speedo) is 2, the gear is in 11, 12, or 13 depending on whether you want the lever position, the current gear, or the target gear (so probably 12).
term in the third column. S08 is 8 bits (1 byte), U16 is 16 bits (2 bytes). U
means signed (plus and minus numbers, but the maximum is only 1/2 as much). The speedo value is U16, so 16 bits. The gear value is S08 so 8 bits (the current gear value needs to allow negative numbers to have a reverse gear, and we certainly don't need a gear range over 127 in any case!).
Lance.