Greatly Improved auto alignment.

This commit is contained in:
C4llSiqn
2025-03-07 21:46:25 -07:00
parent 5ae62c89e5
commit 63808a652e
6 changed files with 55 additions and 32 deletions
@@ -297,17 +297,17 @@ public class Elevator extends Subsystem {
// double elevatorVelocity = elevatorMotor.getVelocity().getValueAsDouble();
// double elevatorTorque = elevatorMotor.getTorqueCurrent().getValueAsDouble();
double endeffectorVelocity = endeffectorMotor.getVelocity().getValueAsDouble();
double endeffectorTorque = endeffectorMotor.getTorqueCurrent().getValueAsDouble();
// double endeffectorVelocity = endeffectorMotor.getVelocity().getValueAsDouble();
// double endeffectorTorque = endeffectorMotor.getTorqueCurrent().getValueAsDouble();
if(endeffectorVelocity < ElevatorConstants.SAFETY_ENDEFFECTOR_MIN_VELOCITY && endeffectorTorque > ElevatorConstants.SAFETY_ENDEFFECTOR_MAX_TORQUE ){
PIDPosition(endeffectorMotor, endeffectorMotor.getPosition().getValueAsDouble());
}
// if(endeffectorVelocity < ElevatorConstants.SAFETY_ENDEFFECTOR_MIN_VELOCITY && endeffectorTorque > ElevatorConstants.SAFETY_ENDEFFECTOR_MAX_TORQUE ){
// PIDPosition(endeffectorMotor, endeffectorMotor.getPosition().getValueAsDouble());
// }
// This method will be called once per scheduler run
SmartDashboard.putNumber("Velocity Endeffector", endeffectorVelocity);
SmartDashboard.putNumber("Torque Endeffector", endeffectorTorque);
// SmartDashboard.putNumber("Velocity Endeffector", endeffectorVelocity);
// SmartDashboard.putNumber("Torque Endeffector", endeffectorTorque);
SmartDashboard.putNumber("Basin", basinBeamBreak.get() ? 1 : 0);
SmartDashboard.putNumber("endefector", endeffectorLimitSwitch.get() ? 1 : 0);
SmartDashboard.putNumber("intake", intakeIR.get() ? 1 : 0);