Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
Co-authored-by: Lucien Morey <lucienp@live.com.au>
  • Loading branch information
mlists and LucienMorey authored Mar 11, 2024
1 parent 9e95f17 commit 7b701e9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions components/climber.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ def enable_soft_limits(self) -> None:

def should_lock_mechanisms(self) -> bool:
# Climbs in the last 20 seconds are real climbs...
return (
wpilib.DriverStation.getMatchTime() < 20 and self.seen_deploy_limit_switch
)
return self.seen_deploy_limit_switch

def deploy(self) -> None:
if self.has_deploy_finished():
Expand Down Expand Up @@ -108,7 +106,7 @@ def execute(self) -> None:
if self.has_climb_finished():
if self.last_position is not self.POSITION.RETRACTED:
self.status_lights.no_note()
if wpilib.DriverStation.getMatchTime() < 20:
if wpilib.DriverStation.getMatchTime() > 20:
# reset in case of accidental climb
self.seen_deploy_limit_switch = False
elif self.has_deploy_finished():
Expand Down

0 comments on commit 7b701e9

Please sign in to comment.