added tentative button mapping for boomboom

This commit is contained in:
‮Aarav Shah
2022-01-29 11:33:57 -07:00
parent 708d720778
commit d666e9eb9d
2 changed files with 5 additions and 42 deletions
@@ -92,8 +92,12 @@ public class RobotContainer {
new JoystickButton(getOperatorJoystick(), XboxController.A_BUTTON)
.whenPressed(() -> m_robotLED.setPattern(LEDPatterns.LAVA_RAINBOW))
.whenReleased(() -> m_robotLED.setPattern(LEDConstants.DEFAULT_PATTERN));
// activates "BoomBoom"
new JoystickButton(getOperatorJoystick(), XboxController.B_BUTTON)
.whenPressed(() -> m_robotBoomBoom.runDrumShooterVelocityPID(0.1))
.whenReleased(() -> m_robotBoomBoom.runDrumShooterVelocityPID(0));
/* Driver Buttons */
}
/**
* Use this to pass the autonomous command to the main {@link Robot} class.
*
@@ -39,42 +39,6 @@ public double m_fireVel;
public Hood m_hoodSubsystem;
public Turret m_turretSubsystem;
SimpleMotorFeedforward feedforward = new SimpleMotorFeedforward(69, 42, 0); //get real values later
@@ -151,9 +115,6 @@ try {
m_turretSubsystem = subsystem1;
}
public double addFireVel(){
return m_fireVel;
}
public void runDrumShooter(double speed) {
m_shooterFalconLeft.set(TalonFXControlMode.PercentOutput, speed);
m_shooterFalconRight.follow(m_shooterFalconLeft);
@@ -177,7 +138,5 @@ public void setShooterGains() {
// m_shooterFalconLeft.set(controller.calculate(encoder.getRate(), targetVel) + 0.9 * feedforward.calculate(targetVel));
m_shooterFalconLeft.set(m_controller.calculate(m_shooterFalconLeft.get(), targetVel));
}
}