]> git.taranathan.com Git - FRC2026.git/commitdiff
smart dashboard stuff for elastic
authorWesleyWong-972 <wesleycwong@gmail.com>
Sat, 28 Mar 2026 12:27:17 +0000 (05:27 -0700)
committerWesleyWong-972 <wesleycwong@gmail.com>
Sat, 28 Mar 2026 12:27:17 +0000 (05:27 -0700)
src/main/java/frc/robot/subsystems/Intake/Intake.java
src/main/java/frc/robot/subsystems/spindexer/Spindexer.java
src/main/java/frc/robot/subsystems/turret/Turret.java

index ab4ded6821b22a511eb1d0f88f12e7fa3f7fb3e1..126013e8fb46e31ed05b18705c365f29c83e6c9c 100644 (file)
@@ -150,7 +150,9 @@ public class Intake extends SubsystemBase implements IntakeIO{
         SmartDashboard.putData("Extension Mechanism", mechanism);
         SmartDashboard.putData("Intake Calibrate", new InstantCommand(() -> calibrate()));
         SmartDashboard.putData("Intake Stop Calibrating", new InstantCommand(() -> stopCalibrating()));
-
+        SmartDashboard.putData("Extend Intake", new InstantCommand(() -> extend()));
+        SmartDashboard.putData("Retract Intake", new InstantCommand(() -> retract()));
+        
         if (RobotBase.isSimulation()) {
             // Extender simulation
             // the supply voltage should change with load....
index 0f06b8ac8110bde6c8be5f81ee659287906e5bb1..4af68f96ef5af0a266f711703931cb211c8544c5 100644 (file)
@@ -69,6 +69,8 @@ public class Spindexer extends SubsystemBase implements SpindexerIO {
             ballCount++;
         }
         wasSpindexerSlow = isSpindexerSlow;
+
+        SmartDashboard.putBoolean("Spindexer Jamming", reversing);
     }
 
     public void maxSpindexer() {
index 3dddcd2b69667b4ab0f9a5d100921bc131f23f21..69247a114cdf22cc48dd7259462e3b9fbd789e86 100644 (file)
@@ -105,6 +105,7 @@ public class Turret extends SubsystemBase implements TurretIO{
                SmartDashboard.putData("Turret Mech", mech);
                SmartDashboard.putData("Start turret calibration", new InstantCommand(()-> calibrate()));
                SmartDashboard.putData("Stop turret calibration", new InstantCommand(()-> stopCalibrating()));
+               SmartDashboard.putData("Reset Turret Position to Zero", new InstantCommand(() -> resetTurretPosition()));
 
                SendableChooser<InstantCommand> turretTestChooser = new SendableChooser<>();
                turretTestChooser.setDefaultOption("Turn to 0", new InstantCommand(()-> setFieldRelativeTarget(Rotation2d.fromDegrees(0), 0.0)));
@@ -151,6 +152,10 @@ public class Turret extends SubsystemBase implements TurretIO{
                return Units.rotationsToDegrees(motor.getPosition().getValueAsDouble()) / TurretConstants.GEAR_RATIO;
        }
 
+       public void resetTurretPosition() {
+               inputs.positionDeg = 0.0;
+       }
+
        /* ---------------- Periodic ---------------- */
 
        @Override