Skip to content

Commit

Permalink
Remove wrist default command
Browse files Browse the repository at this point in the history
Co-Authored-By: Kyle Huang <72529534+brokenfloppydisk@users.noreply.github.com>
  • Loading branch information
adewinmbi and brokenfloppydisk committed Oct 8, 2023
1 parent 02b3044 commit e68092f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ public void initDefaultCommands() {
}
));

wrist.setDefaultCommand(Commands.run(() -> wrist.moveWristMotionMagicJoystick(-operatorController.getLeftY()), wrist));
// Removed to allow percent output joystick control
// wrist.setDefaultCommand(Commands.run(() -> wrist.moveWristMotionMagicJoystick(-operatorController.getLeftY()), wrist));
}

private void configureBindings() {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/subsystems/Wrist.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void init() {

}

// Use during a match to re-enable motion magic and turn on joystick input
// Use during a match to re-enable motion magic and turn off joystick input
public void resetToStowPosition() {
toggleMotionMagic(true);
zeroEncodersStow();
Expand Down Expand Up @@ -118,7 +118,7 @@ public void moveWristMotionMagicJoystick(double joystickInput) {
int tickChange = (int) (WristConstants.kJoystickScale * joystickInput);
int currentTicks = (int) wrist.getSelectedSensorPosition();

tickChange = (int) joystickFilter.calculate(tickChange);
// tickChange = (int) joystickFilter.calculate(tickChange);

targetTicks = currentTicks + tickChange;
targetTicks = (int) NerdyMath.clamp(targetTicks, WristConstants.kWristLowerLimit, WristConstants.kWristUpperLimit);
Expand Down

0 comments on commit e68092f

Please sign in to comment.