Skip to content

Commit

Permalink
fixed failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SebZanardo committed Jan 21, 2024
1 parent 97d83fc commit 50c9e89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/shooter.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def start_injection(self) -> None:
self.should_inject = True

def stop_injection(self) -> None:
self.should_inject = True
self.should_inject = False

def set_flywheel_target(self, target_speed: float) -> None:
self.flywheel_target_speed = target_speed
Expand All @@ -79,7 +79,7 @@ def inclination_angle(self) -> float:
@feedback
def is_flywheel_at_speed(self) -> bool:
return (
abs(self.flywheel_target_speed - self.flywheel.get_velocity())
abs(self.flywheel_target_speed - self.flywheel.get_velocity().value)
< self.FLYWHEEL_TOLERANCE
)

Expand Down
2 changes: 1 addition & 1 deletion controllers/shooter.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def ranging(self) -> None:
def shooting(self) -> None:
self.shooter_component.start_injection()

@state(first=True)
@state
def resetting(self) -> None:
self.shooter_component.stop_injection()
self.done()
Expand Down

0 comments on commit 50c9e89

Please sign in to comment.