Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

controlsd: only add startup event until initialized #23671

Merged
merged 3 commits into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions selfdrive/controls/controlsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,8 @@ def update_events(self, CS):
"""Compute carEvents from carState"""

self.events.clear()
self.events.add_from_msg(CS.events)
self.events.add_from_msg(self.sm['driverMonitoringState'].events)

# Handle startup event
# Add startup event
if self.startup_event is not None:
self.events.add(self.startup_event)
self.startup_event = None
Expand All @@ -194,6 +192,9 @@ def update_events(self, CS):
self.events.add(EventName.controlsInitializing)
return

self.events.add_from_msg(CS.events)
self.events.add_from_msg(self.sm['driverMonitoringState'].events)

# Create events for battery, temperature, disk space, and memory
if EON and (self.sm['peripheralState'].pandaType != PandaType.uno) and \
self.sm['deviceState'].batteryPercent < 1 and self.sm['deviceState'].chargingError:
Expand Down
1 change: 0 additions & 1 deletion selfdrive/test/process_replay/process_replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ def fingerprint(msgs, fsm, can_sock, fingerprint):
can_sock.data = []

fsm.update_ready.set()
print("finished fingerprinting")


def get_car_params(msgs, fsm, can_sock, fingerprint):
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/test/process_replay/ref_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d2ea206bf832dbc0625756d56820895e52d3029e
c751c4948ec4e30706ff8a40129f0020214a7c63