Skip to content

Commit

Permalink
fixing bumper condition
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBaecker committed Nov 29, 2024
1 parent 210ceb2 commit 23082ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions field_friend/automations/automation_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ def stop(self, reason: str) -> None:

def try_resume(self) -> None:
# Set conditions to True by default, which means they don't block the process if the watch is not active
if self.field_friend.bumper is not None:
bumper_condition = not bool(self.field_friend.bumper.active_bumpers) if self.bumper_watch_active else True
bumper_condition = True
if self.field_friend.bumper is not None and self.bumper_watch_active:
bumper_condition = not bool(self.field_friend.bumper.active_bumpers)
gnss_condition = (self.gnss.current is not None and ('R' in self.gnss.current.mode or self.gnss.current.mode == 'SSSS')) \
if self.gnss_watch_active else True

Expand Down

0 comments on commit 23082ed

Please sign in to comment.