Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Commit

Permalink
Fix swiffer command end behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahsnider committed Apr 4, 2022
1 parent ed2d6df commit d6d1c6c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
5 changes: 5 additions & 0 deletions simgui-window.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
"Pos": "1411,747",
"Size": "170,274"
},
"###DIO": {
"Collapsed": "0",
"Pos": "1677,877",
"Size": "195,86"
},
"###FMS": {
"Collapsed": "0",
"Pos": "414,437",
Expand Down
1 change: 1 addition & 0 deletions simgui.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"0": {
"columns": 8
},
"DIO": {
"window": {
"visible": true
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ private void configureCopilotButtonBindings() {
copilotController.aButton.whenHeld(new UpperHubAlignCommand(driveSubsystem, localization));

// Snarfing
copilotController.rightTrigger.whileHeld(new ArmDownAndSnarfCommand(superstructureSubsystem));
copilotController.rightTrigger.whenHeld(new ArmDownAndSnarfCommand(superstructureSubsystem));

// Shooting
copilotController.leftTrigger.whileHeld(
copilotController.leftTrigger.whenHeld(
new ArmUpAndSwifferShootCommand(superstructureSubsystem));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,8 @@ public void initialize() {
swiffer.setDesiredMode(mode);
}

// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {}

// Called once the command ends or is interrupted.
@Override
public void end(boolean interrupted) {
swiffer.setDesiredMode(SwifferMode.STOPPED);
}

// Returns true when the command should end.
@Override
public boolean isFinished() {
return swiffer.atGoal(mode);
return false;
}
}

0 comments on commit d6d1c6c

Please sign in to comment.