mirror of
https://github.com/Team4388/2019-Hit-or-Miss.git
synced 2026-06-09 00:28:05 -06:00
Updates to climber WIP
Theoretically functional TODO -Add saftey switch -Add front flip out buton
This commit is contained in:
@@ -49,9 +49,10 @@ public class OI
|
||||
CarriageEject.whenPressed(new IntakeSetSpeed(Carriage.CUBE_INTAKE_SPEED));
|
||||
CarriageEject.whenReleased(new IntakeSetSpeed(0.0));
|
||||
*/
|
||||
JoystickButton climbUp = new JoystickButton(m_operatorXbox.getJoyStick(), XboxController.X_BUTTON);
|
||||
climbUp.whenPressed(new InitiateClimber(true));
|
||||
climbUp.whenReleased(new InitiateClimber(false));
|
||||
JoystickButton climbUp = new JoystickButton(m_operatorXbox.getJoyStick(), XboxController.RIGHT_TRIGGER_AXIS);
|
||||
int speed = XboxController.RIGHT_TRIGGER_AXIS;
|
||||
climbUp.whenPressed(new InitiateClimber(true, speed));
|
||||
climbUp.whenReleased(new InitiateClimber(false, speed));
|
||||
|
||||
JoystickButton shiftUp = new JoystickButton(m_driverXbox.getJoyStick(), XboxController.RIGHT_BUMPER_BUTTON);
|
||||
shiftUp.whenPressed(new DriveSpeedShift(true));
|
||||
|
||||
@@ -10,9 +10,10 @@ public class InitiateClimber extends Command
|
||||
boolean climb;
|
||||
float speed;
|
||||
|
||||
public InitiateClimber(boolean Climb) {
|
||||
public InitiateClimber(boolean Climb, int speed) {
|
||||
requires(Robot.climber);
|
||||
this.climb = Climb;
|
||||
this.speed = speed;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -96,7 +96,6 @@ public class Climber extends Subsystem{
|
||||
climberBack.set(BACK_FREQ * speed);
|
||||
climberFront.set(FRONT_FREQ * speed);
|
||||
}
|
||||
|
||||
}
|
||||
if (Climb == false) {
|
||||
climberBack.set(0);
|
||||
@@ -105,7 +104,6 @@ public class Climber extends Subsystem{
|
||||
}
|
||||
}
|
||||
/*TODO
|
||||
* add command code for starting climb (including button press)
|
||||
* add command code for flipping front out (including button press)
|
||||
* add saftey switch on second controller
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user