This repository was archived by the owner on Jan 9, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +2
-22
lines changed
src/main/java/frc/robot/subsystems/pivotshooter Expand file tree Collapse file tree 2 files changed +2
-22
lines changed Original file line number Diff line number Diff line change 1313import com .ctre .phoenix6 .SignalLogger ;
1414import edu .wpi .first .math .interpolation .InterpolatingDoubleTreeMap ;
1515import edu .wpi .first .wpilibj2 .command .Command ;
16- import edu .wpi .first .wpilibj2 .command .Commands ;
1716import edu .wpi .first .wpilibj2 .command .sysid .SysIdRoutine ;
1817import frc .robot .subsystems .vision .Vision ;
1918import frc .robot .utils .DisableSubsystem ;
@@ -76,25 +75,11 @@ public Command off() {
7675 return this .runOnce (pivotShooterIO ::off );
7776 }
7877
79- public Command slamZero () {
80- return this .run (() -> pivotShooterIO .setVoltage (PivotShooterConstants .kPivotSlamShooterVoltage ))
81- .until (
82- () ->
83- pivotShooterIOAutoLogged .pivotShooterMotorStatorCurrent
84- > PivotShooterConstants .kPivotSlamStallCurrent )
85- .andThen (this .zero ());
86- }
87-
8878 public Command setSub () {
8979 return setPosition (
9080 PivotShooterConstants .kSubWooferPreset * PivotShooterConstants .kPivotMotorGearing );
9181 }
9282
93- public Command slamAndPID () {
94-
95- return Commands .sequence (this .setPosition (0 ), this .slamZero ());
96- }
97-
9883 public Command zero () {
9984 return this .runOnce (pivotShooterIO ::zero );
10085 }
Original file line number Diff line number Diff line change @@ -22,21 +22,16 @@ public final class PivotShooterConstants {
2222
2323 public static final int kPivotMotorID = 51 ;
2424
25- /* PID */
26-
2725 /* Physics/geometry */
28- public static final double kPivotMotorGearing = 138.333 ; // 22 by 1
26+ public static final double kPivotMotorGearing = 138.333 ; // TODO: get from nate
2927
30- /* Preset */
31- public static final double kPivotSlamIntakeVoltage = -5 ;
32- public static final double kPivotSlamShooterVoltage = -2 ;
28+ // max value is 8, min is 0
3329
3430 /* Misc */
3531 public static final boolean kUseFOC = false ;
3632 public static final boolean kUseMotionMagic = false ; // idk
3733 public static final double updateFrequency = 50.0 ;
3834 public static final int flashConfigRetries = 5 ;
39- public static final double kPivotSlamStallCurrent = 50 ;
4035
4136 public static final TalonFXConfiguration motorConfigs =
4237 new TalonFXConfiguration ()
You can’t perform that action at this time.
0 commit comments