grabbing real values
This commit is contained in:
parent
b7987ee8f3
commit
a5e8dfacd5
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue