}
// Auto shoot
- if (turret != null) {
+ if (turret != null && hood != null && shooter != null) {
driver.get(PS5Button.SQUARE).onTrue(
new InstantCommand(() -> {
if (autoShoot != null && autoShoot.isScheduled()) {
}
if (climb != null) {
- driver.get(PS5Button.CIRCLE).onTrue(new InstantCommand(() -> {
+ driver.get(PS5Button.PS).onTrue(new InstantCommand(() -> {
climb.hardstopCalibration();
})).onFalse(new InstantCommand(() -> {
climb.stopCalibrating();
SmartDashboard.putNumber("shooter power modifier", powerModifier);
// Convert to RPS
- double targetVelocityRPS = Units.radiansToRotations(shooterTargetSpeed / (ShooterConstants.SHOOTER_LAUNCH_DIAMETER/2));
+ double targetVelocityRPS = Units.radiansToRotations(shooterTargetSpeed / (ShooterConstants.SHOOTER_LAUNCH_DIAMETER/2)) * powerModifier;
// Sets the motor control to target velocity
shooterMotorLeft.setControl(voltageRequest.withVelocity(targetVelocityRPS));