Skip to content

Commit

Permalink
rename to inactive_events
Browse files Browse the repository at this point in the history
  • Loading branch information
deanlee committed Oct 14, 2024
1 parent 85a6b37 commit 59f9e47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions selfdrive/selfdrived/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ def add(self, event_name: int, static: bool=False) -> None:
def clear(self) -> None:
# Get events no longer active
current_event_set = set(self.events)
events_to_clear = self.prev_event_set - current_event_set
inactive_events = self.prev_event_set - current_event_set

# Reset counters for inactive events
for event_name in events_to_clear:
for event_name in inactive_events:
self.event_counters[event_name] = 0

# Reset active events and update previous set
Expand Down

0 comments on commit 59f9e47

Please sign in to comment.