From d6d1c6ce793363bd7689184d2b8e869ee47f8097 Mon Sep 17 00:00:00 2001 From: Jonah Snider Date: Fri, 1 Apr 2022 15:18:00 -0700 Subject: [PATCH] Fix swiffer command end behavior --- simgui-window.json | 5 +++++ simgui.json | 1 + src/main/java/frc/robot/RobotContainer.java | 4 ++-- .../swiffer/commands/SwifferCommand.java | 13 +------------ 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/simgui-window.json b/simgui-window.json index e10cbf2..5090cfd 100644 --- a/simgui-window.json +++ b/simgui-window.json @@ -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", diff --git a/simgui.json b/simgui.json index c2cecd1..62a793e 100644 --- a/simgui.json +++ b/simgui.json @@ -4,6 +4,7 @@ "0": { "columns": 8 }, + "DIO": { "window": { "visible": true } diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 58d45cd..06900cd 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -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)); } diff --git a/src/main/java/frc/robot/superstructure/swiffer/commands/SwifferCommand.java b/src/main/java/frc/robot/superstructure/swiffer/commands/SwifferCommand.java index 5f5ef14..db2ca9f 100644 --- a/src/main/java/frc/robot/superstructure/swiffer/commands/SwifferCommand.java +++ b/src/main/java/frc/robot/superstructure/swiffer/commands/SwifferCommand.java @@ -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; } }