]> git.taranathan.com Git - FRC2026.git/commitdiff
Merge branch 'main' into some-fixes
authoriefomit <timofei.stem@gmail.com>
Fri, 17 Apr 2026 22:24:59 +0000 (15:24 -0700)
committeriefomit <timofei.stem@gmail.com>
Fri, 17 Apr 2026 22:24:59 +0000 (15:24 -0700)
1  2 
src/main/java/frc/robot/subsystems/spindexer/Spindexer.java

index 625efb84846e7284b266688e2d39de74056dce4a,2901af04e6da0fe95bfcdf6ced480340477ca78b..7d3e06efdb609aa773db6fed38546752d7f9dcd8
@@@ -66,15 -66,19 +66,15 @@@ public class Spindexer extends Subsyste
          }
  
          if (state == SpindexerState.MAX) {
-             motor.setControl(new DutyCycleOut(SpindexerConstants.spindexerMaxPower).withEnableFOC(true));
+             motor.setControl(new VoltageOut(12 * SpindexerConstants.spindexerMaxPower).withEnableFOC(true));
 -            reversing = false;
          } else if (state == SpindexerState.REVERSE) {
-             motor.setControl(new DutyCycleOut(SpindexerConstants.spindexerReversePower).withEnableFOC(true));
+             motor.setControl(new VoltageOut(12 * SpindexerConstants.spindexerReversePower).withEnableFOC(true));
 -            reversing = true;
          } else if (state == SpindexerState.STOPPED) {
-             motor.setControl(new DutyCycleOut(0.0).withEnableFOC(true));
+             motor.setControl(new VoltageOut(12 * 0.0).withEnableFOC(true));
 -            reversing = false;
          } else if (state == SpindexerState.RESET && resetPos != null) {
-             motor.setControl(new DutyCycleOut(resetPID.calculate((motor.getPosition().getValueAsDouble() / gearRatio) % 1.0, resetPos)).withEnableFOC(true));
+             motor.setControl(new VoltageOut(12 * resetPID.calculate((motor.getPosition().getValueAsDouble() / gearRatio) % 1.0, resetPos)).withEnableFOC(true));
          } else {
-             motor.setControl(new DutyCycleOut(power).withEnableFOC(true));
+             motor.setControl(new VoltageOut(12 * power).withEnableFOC(true));
 -            reversing = false;
          }