B6 Lua fixes

only:proteus_f7
This commit is contained in:
rusefillc 2023-03-05 20:12:58 -05:00
parent 09ed25d82d
commit 7d252ee2ff
1 changed files with 3 additions and 1 deletions

View File

@ -150,6 +150,8 @@ canRxAdd(TCU_1, onTcu1)
canRxAdd(TCU_2, onTcu2)
--canRxAdd(BRAKE_2)
rpm = 0
function sendMotor1()
engineTorque = fakeTorque * 0.9
innerTorqWithoutExt = fakeTorque
@ -175,7 +177,7 @@ end
function onMotor1(bus, id, dlc, data)
rpm = getSensor("RPM") or 0
rpm = math.floor(getSensor("RPM") + 0.5)
tps = getSensor("TPS1") or 0
fakeTorque = interpolate(0, 6, 100, 60, tps)