grabbing real values

This commit is contained in:
rusefillc 2024-02-11 10:14:03 -05:00
parent b7987ee8f3
commit a5e8dfacd5
1 changed files with 10 additions and 0 deletions

View File

@ -62,6 +62,11 @@ function onTcu440(bus, id, dlc, data)
relayFromTcuToVehicle(bus, id, dlc, data)
end
realEngineTorque = 0
realInnerTorqWithoutExt = 0
realTorqueLoss = 0
realRequestedTorque = 0
function sendMotor1()
engineTorque = fakeTorque * 0.9
innerTorqWithoutExt = fakeTorque
@ -167,6 +172,11 @@ function onMotor1(bus, id, dlc, data)
canMotorInfoTotalCounter = 0
end
realEngineTorque = data[2] * 0.39
realInnerTorqWithoutExt = data[5] * 0.4
realTorqueLoss = data[7] * 0.39
realRequestedTorque = data[8] * 0.39
tps = getBitRange(data, 40, 8) * 0.4
fakeTorque = interpolate(0, 6, 100, 60, tps)