Update B6-temp.md

This commit is contained in:
rusefillc 2022-09-17 22:26:47 -04:00 committed by GitHub
parent e4c7a8aa76
commit a6daefaa56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 70 additions and 66 deletions

View File

@ -136,6 +136,8 @@ function onMotor3(bus, id, dlc, data)
tps = getBitRange(data, 56, 8) * 0.40 tps = getBitRange(data, 56, 8) * 0.40
print ('pps ' ..pps ..' tps ' ..tps ..' iat ' ..iat) print ('pps ' ..pps ..' tps ' ..tps ..' iat ' ..iat)
desired_wheel_torque = fakeTorque
canMotor3[2] = (iat + 48) / 0.75 canMotor3[2] = (iat + 48) / 0.75
canMotor3[3] = tps / 0.4 canMotor3[3] = tps / 0.4
canMotor3[5] = 0x20 canMotor3[5] = 0x20
@ -162,10 +164,10 @@ end
canRxAdd(ECU_BUS, MOTOR_1, onMotor1) canRxAdd(ECU_BUS, MOTOR_1, onMotor1)
canRxAdd(ECU_BUS, MOTOR_3, onMotor3) canRxAdd(ECU_BUS, MOTOR_3, onMotor3)
-- canRxAdd(ECU_BUS, MOTOR_5, printAndDrop) canRxAdd(ECU_BUS, MOTOR_5, printAndDrop)
canRxAdd(ECU_BUS, MOTOR_INFO, printAndDrop) canRxAdd(ECU_BUS, MOTOR_INFO, printAndDrop)
canRxAdd(ECU_BUS, MOTOR_6, printAndDrop) canRxAdd(ECU_BUS, MOTOR_6, printAndDrop)
-- canRxAdd(ECU_BUS, MOTOR_7, printAndDrop) canRxAdd(ECU_BUS, MOTOR_7, printAndDrop)
-- last option: unconditional forward of all remaining messages -- last option: unconditional forward of all remaining messages
canRxAddMask(ECU_BUS, 0, 0, onAnythingFromECU) canRxAddMask(ECU_BUS, 0, 0, onAnythingFromECU)
@ -187,4 +189,6 @@ function onTick()
end end
end end
``` ```