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:
Adeeb Shihadeh
2024-09-05 16:28:57 -07:00
committed by GitHub
parent e0be4a1f85
commit aef650013e
5 changed files with 106 additions and 107 deletions
+2 -2
View File
@@ -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))