fix lua CAN RX of 11b frames #4321

This commit is contained in:
rusefillc 2022-07-05 13:40:02 -04:00
parent dec3021c8f
commit a42a671aca
2 changed files with 1 additions and 3 deletions

View File

@ -181,8 +181,7 @@ shallSleep = Timer.new()
hadIgnitionEvent = false
function onCanRx(bus, id, dlc, data)
id11 = id % 2048
if id11 == AIRBAG then
if id == AIRBAG then
-- looks like we have ignition key do not sleep!
shallSleep : reset()
hadIgnitionEvent = true

View File

@ -12,7 +12,6 @@ canRxAdd(CAN_BUTTONS) -- buttons
setTickRate(5) -- set tick rate to 5hz
function onCanRx(bus, id, dlc, data)
id = id % 2048
-- print('got CAN id=' ..id ..' dlc=' ..dlc)
if id == CAN_BUTTONS then