Skip to content

Commit

Permalink
feat: climber prototype push cart controls
Browse files Browse the repository at this point in the history
  • Loading branch information
GearBoxFox committed Feb 1, 2024
1 parent aef2a5d commit 4327884
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
7 changes: 2 additions & 5 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,8 @@ private void configureButtonBindings() {

controller.a().whileTrue(m_shooter.setShooterPowerFactory(0.6, 0.6))
.whileFalse(m_shooter.setShooterPowerFactory(0.0, 0.0));

// controller.leftBumper().whileTrue(m_climber.setClimberPowerFactory(-0.25))
// .whileFalse(m_climber.setClimberPowerFactory(0.0));
// controller.rightBumper().whileTrue(m_climber.setClimberPowerFactory(0.25))
// .whileFalse(m_climber.setClimberPowerFactory(0.0));
controller.b().whileTrue(m_shooter.runFullShooter(0.6, 0.6))
.whileFalse(m_shooter.runFullShooter(0.0, 0.0));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

public class ShooterIOPrototype implements ShooterIO {
private final CANSparkFlex m_topLeftMotor;
private final CANSparkFlex m_topRightMotor;
private final CANSparkMax m_bottomLeftMotor;
private final CANSparkMax m_topRightMotor;
private final CANSparkFlex m_bottomLeftMotor;
private final CANSparkMax m_bottomRightMotor;
private final CANSparkMax m_kickekMotor;
public ShooterIOPrototype() {
m_topLeftMotor = new CANSparkFlex(13, CANSparkLowLevel.MotorType.kBrushless);
m_topRightMotor = new CANSparkFlex(14, CANSparkLowLevel.MotorType.kBrushless);
m_bottomLeftMotor = new CANSparkMax(15, CANSparkLowLevel.MotorType.kBrushless);
m_topRightMotor = new CANSparkMax(14, CANSparkLowLevel.MotorType.kBrushless);
m_bottomLeftMotor = new CANSparkFlex(15, CANSparkLowLevel.MotorType.kBrushless);
m_bottomRightMotor = new CANSparkMax(16, CANSparkLowLevel.MotorType.kBrushless);
m_kickekMotor = new CANSparkMax(17, CANSparkLowLevel.MotorType.kBrushless);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,13 @@ public Command setIntakePowerFactory(double power) {
setKickerPower(power == 0.0 ? 0.0 : 0.75);
});
}

public Command runFullShooter(double left, double right) {
return runOnce(() -> {
setShooterPowerLeft(left);
setShooterPowerRight(right);
setKickerPower(left == 0.0 ? 0.0 : 0.75);
});
}
}

0 comments on commit 4327884

Please sign in to comment.