mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-30 19:33:45 +08:00
controlsd: split up publishing and logic (#33483)
* split up the pubs * move all event adds * split out alerts * lil more * clenaup * update test * cleanup
This commit is contained in:
@@ -33,8 +33,8 @@ if __name__ == "__main__":
|
||||
if len(events) == 0 or ae != events[-1][1]:
|
||||
events.append((t, ae))
|
||||
|
||||
elif msg.which() == 'controlsState':
|
||||
at = msg.controlsState.alertType
|
||||
elif msg.which() == 'selfdriveState':
|
||||
at = msg.selfdriveState.alertType
|
||||
if "/override" not in at or "lanechange" in at.lower():
|
||||
if len(alerts) == 0 or alerts[-1][1] != at:
|
||||
alerts.append((t, at))
|
||||
|
||||
Reference in New Issue
Block a user