diff --git a/controller.svg b/controller.svg new file mode 100644 index 0000000..d7f9d75 --- /dev/null +++ b/controller.svg @@ -0,0 +1,32 @@ + + controller + + + + + + Action Title + Action Title + Action Title + Action Title + Action Title + Action Title + Action Title + Action Title + Action Title + Action Title + Action Title + Action Title + Action Title + Action Title + Action Title + Action Title + Action Title + Action title + Action Title + \ No newline at end of file diff --git a/controller.webp b/controller.webp new file mode 100644 index 0000000..3908f11 Binary files /dev/null and b/controller.webp differ diff --git a/src/main/java/frc4388/robot/subsystems/Climber.java b/src/main/java/frc4388/robot/subsystems/Climber.java index d16f830..bd2ff1f 100644 --- a/src/main/java/frc4388/robot/subsystems/Climber.java +++ b/src/main/java/frc4388/robot/subsystems/Climber.java @@ -8,16 +8,35 @@ import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX; import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc4388.robot.Constants.ClimberConstants; +import com.ctre.phoenix.motorcontrol.LimitSwitchNormal; +import com.ctre.phoenix.motorcontrol.LimitSwitchSource; + public class Climber extends SubsystemBase { private WPI_TalonFX elbow; /** Creates a new Climber */ - public Climber(WPI_TalonFX elbow) { this.elbow = elbow; } - - public void setEncoders(double value) { this.elbow.setSelectedSensorPosition(value); } - public double getCurrent() { return this.elbow.getSupplyCurrent(); } - public void setMotors(double elbowOutput) { this.elbow.set(elbowOutput * ClimberConstants.INPUT_MULTIPLIER); } + public Climber(WPI_TalonFX elbow) { + this.elbow = elbow; + elbow.configReverseLimitSwitchSource(LimitSwitchSource.FeedbackConnector, LimitSwitchNormal.NormallyOpen); + elbow.overrideLimitSwitchesEnable(true); + + elbow.configForwardSoftLimitThreshold(ClimberConstants.ELBOW_FORWARD_SOFT_LIMIT); + elbow.configForwardSoftLimitEnable(true); + } + + public void setEncoders(double value) { + this.elbow.setSelectedSensorPosition(value); + } + + public double getCurrent() { + return this.elbow.getSupplyCurrent(); + } + + public void setMotors(double elbowOutput) { + this.elbow.set(elbowOutput * ClimberConstants.INPUT_MULTIPLIER); + } @Override - public void periodic() {} + public void periodic() { + } } \ No newline at end of file