Skip to content

Commit

Permalink
made stop also set events
Browse files Browse the repository at this point in the history
  • Loading branch information
cparece1 committed Nov 15, 2024
1 parent 82c01be commit e05dd76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/digger/digger/digger_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ def toggle(self, digger_belt_power: float) -> None:
def stop_lift(self) -> None:
"""This method stops the lift."""
self.lift_running = False
self.top_limit_event.set()
self.bottom_limit_event.set()
self.cli_motor_set.call_async(
MotorCommandSet.Request(type="duty_cycle", can_id=self.DIGGER_LIFT_MOTOR, value=0.0)
)
Expand Down
2 changes: 2 additions & 0 deletions src/dumper/dumper/dumper_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def set_power(self, dumper_power: float) -> None:
def stop(self) -> None:
"""This method stops the dumper."""
self.running = False
self.top_limit_event.set()
self.bottom_limit_event.set()
self.cli_motor_set.call_async(MotorCommandSet.Request(type="duty_cycle", can_id=self.DUMPER_MOTOR, value=0.0))

def toggle(self, dumper_power: float) -> None:
Expand Down

0 comments on commit e05dd76

Please sign in to comment.