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....
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)));
return Units.rotationsToDegrees(motor.getPosition().getValueAsDouble()) / TurretConstants.GEAR_RATIO;
}
+ public void resetTurretPosition() {
+ inputs.positionDeg = 0.0;
+ }
+
/* ---------------- Periodic ---------------- */
@Override