soooo close!

This commit is contained in:
rusefillc 2022-12-30 21:59:28 -05:00
parent 562ab4a6cd
commit a08d2ef8f9
1 changed files with 5 additions and 1 deletions

View File

@ -200,14 +200,18 @@ function onMotorInfo(bus, id, dlc, data)
canMotorInfoCounter = (canMotorInfoCounter + 1) % 16
canMotorInfo[1] = 0x90 + (canMotorInfoCounter)
canMotorInfo1[1] = 0x90 + (canMotorInfoCounter)
canMotorInfo3[1] = 0x90 + (canMotorInfoCounter)
-- mod4 = canMotorInfoCounter % 4
mod4 = data[1]
if (mod4 == 0 or mod4 == 2) then
txCan(1, MOTOR_INFO, 0, canMotorInfo)
elseif (mod4 == 1) then
txCan(1, MOTOR_INFO, 0, canMotorInfo1)
else
txCan(TCU_BUS, id, 0, data) -- relay non-TCU message to TCU
txCan(1, MOTOR_INFO, 0, canMotorInfo3)
end
end