mirror of
https://github.com/Team4388/2025RidgeScape.git
synced 2026-06-09 00:38:02 -06:00
Make the new manual operator controlls
This commit is contained in:
@@ -6,6 +6,8 @@ package frc4388.robot.subsystems;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
import org.opencv.ml.RTrees;
|
||||
|
||||
import com.ctre.phoenix6.configs.Slot0Configs;
|
||||
import com.ctre.phoenix6.controls.PositionDutyCycle;
|
||||
import com.ctre.phoenix6.controls.PositionVoltage;
|
||||
@@ -40,6 +42,8 @@ public class Elevator extends SubsystemBase {
|
||||
private boolean elevatorManualStop = true;
|
||||
private boolean endefectorManualStop = true;
|
||||
|
||||
private boolean disableAutoIntake = false;
|
||||
|
||||
private DigitalInput basinBeamBreak;
|
||||
private DigitalInput endeffectorLimitSwitch;
|
||||
|
||||
@@ -197,6 +201,10 @@ public class Elevator extends SubsystemBase {
|
||||
|
||||
}
|
||||
|
||||
public void togggleAutoIntaking() {
|
||||
disableAutoIntake = !disableAutoIntake;
|
||||
}
|
||||
|
||||
public boolean elevatorAtReference() {
|
||||
// double elevatorRefrence = elevatorMotor.getClosedLoopReference().getValueAsDouble();
|
||||
double elevatorPosition = elevatorMotor.getPosition().getValueAsDouble();
|
||||
@@ -272,6 +280,8 @@ public class Elevator extends SubsystemBase {
|
||||
SmartDashboard.putNumber("Basin", basinBeamBreak.get() ? 1 : 0);
|
||||
SmartDashboard.putNumber("endefector", endeffectorLimitSwitch.get() ? 1 : 0);
|
||||
SmartDashboard.putString("State", currentState.toString());
|
||||
|
||||
if (disableAutoIntake) return;
|
||||
|
||||
if (currentState == CoordinationState.Waiting) {
|
||||
periodicWaiting();
|
||||
|
||||
Reference in New Issue
Block a user