fix lua CAN RX of 11b frames #4321
This commit is contained in:
parent
dec3021c8f
commit
a42a671aca
|
@ -181,8 +181,7 @@ shallSleep = Timer.new()
|
||||||
hadIgnitionEvent = false
|
hadIgnitionEvent = false
|
||||||
|
|
||||||
function onCanRx(bus, id, dlc, data)
|
function onCanRx(bus, id, dlc, data)
|
||||||
id11 = id % 2048
|
if id == AIRBAG then
|
||||||
if id11 == AIRBAG then
|
|
||||||
-- looks like we have ignition key do not sleep!
|
-- looks like we have ignition key do not sleep!
|
||||||
shallSleep : reset()
|
shallSleep : reset()
|
||||||
hadIgnitionEvent = true
|
hadIgnitionEvent = true
|
||||||
|
|
|
@ -12,7 +12,6 @@ canRxAdd(CAN_BUTTONS) -- buttons
|
||||||
setTickRate(5) -- set tick rate to 5hz
|
setTickRate(5) -- set tick rate to 5hz
|
||||||
|
|
||||||
function onCanRx(bus, id, dlc, data)
|
function onCanRx(bus, id, dlc, data)
|
||||||
id = id % 2048
|
|
||||||
-- print('got CAN id=' ..id ..' dlc=' ..dlc)
|
-- print('got CAN id=' ..id ..' dlc=' ..dlc)
|
||||||
|
|
||||||
if id == CAN_BUTTONS then
|
if id == CAN_BUTTONS then
|
||||||
|
|
Loading…
Reference in New Issue