b6 progress
This commit is contained in:
parent
4811a08218
commit
5870e86f5b
|
@ -213,6 +213,8 @@ canMotor7 = { 0x1A, 0x66, 0x7E, 0x00, 0x00, 0x00, 0x00, 0x00 }
|
||||||
|
|
||||||
setTickRate(100)
|
setTickRate(100)
|
||||||
|
|
||||||
|
everySecondTimer = Timer.new()
|
||||||
|
canMotorInfoCounter = 0
|
||||||
|
|
||||||
function onTick()
|
function onTick()
|
||||||
counter = (counter + 1) % 16
|
counter = (counter + 1) % 16
|
||||||
|
@ -229,6 +231,14 @@ function onTick()
|
||||||
-- looks like ignition key was removed
|
-- looks like ignition key was removed
|
||||||
mcu_standby()
|
mcu_standby()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if everySecondTimer:getElapsedSeconds() > 1 then
|
||||||
|
everySecondTimer:reset()
|
||||||
|
|
||||||
|
canMotorInfoCounter = (canMotorInfoCounter + 1) % 8
|
||||||
|
canMotorInfo[1] = 0x90 + (canMotorInfoCounter * 2)
|
||||||
|
txCan(1, MOTOR_INFO, 0, canMotorInfo)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue