Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

Commit 71b85c0

Browse files
clean pivot shooter, also note shooter kinda needs to be retuned (flywheels and the pivot shooter)
1 parent 58dfd10 commit 71b85c0

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

src/main/java/frc/robot/subsystems/pivotshooter/PivotShooter.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import com.ctre.phoenix6.SignalLogger;
1414
import edu.wpi.first.math.interpolation.InterpolatingDoubleTreeMap;
1515
import edu.wpi.first.wpilibj2.command.Command;
16-
import edu.wpi.first.wpilibj2.command.Commands;
1716
import edu.wpi.first.wpilibj2.command.sysid.SysIdRoutine;
1817
import frc.robot.subsystems.vision.Vision;
1918
import 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
}

src/main/java/frc/robot/subsystems/pivotshooter/PivotShooterConstants.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff 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()

0 commit comments

Comments
 (0)