mirror of
https://github.com/Team4388/2022NoWayHome.git
synced 2026-06-09 08:48:07 -06:00
Climber folded bool
This commit is contained in:
@@ -6,6 +6,7 @@ package frc4388.robot.subsystems;
|
|||||||
|
|
||||||
import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX;
|
import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX;
|
||||||
|
|
||||||
|
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||||
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
import edu.wpi.first.wpilibj2.command.SubsystemBase;
|
||||||
import frc4388.robot.Constants.ClimberConstants;
|
import frc4388.robot.Constants.ClimberConstants;
|
||||||
import com.ctre.phoenix.motorcontrol.LimitSwitchNormal;
|
import com.ctre.phoenix.motorcontrol.LimitSwitchNormal;
|
||||||
@@ -18,7 +19,7 @@ public class Climber extends SubsystemBase {
|
|||||||
public Climber(WPI_TalonFX elbow) {
|
public Climber(WPI_TalonFX elbow) {
|
||||||
this.elbow = elbow;
|
this.elbow = elbow;
|
||||||
elbow.configForwardLimitSwitchSource(LimitSwitchSource.FeedbackConnector, LimitSwitchNormal.NormallyOpen);
|
elbow.configForwardLimitSwitchSource(LimitSwitchSource.FeedbackConnector, LimitSwitchNormal.NormallyOpen);
|
||||||
elbow.overrideLimitSwitchesEnable(true);
|
elbow.overrideLimitSwitchesEnable(true); //Check
|
||||||
|
|
||||||
elbow.configReverseSoftLimitThreshold(ClimberConstants.ELBOW_FORWARD_SOFT_LIMIT); // Tune
|
elbow.configReverseSoftLimitThreshold(ClimberConstants.ELBOW_FORWARD_SOFT_LIMIT); // Tune
|
||||||
elbow.configReverseSoftLimitEnable(false);
|
elbow.configReverseSoftLimitEnable(false);
|
||||||
@@ -38,5 +39,6 @@ public class Climber extends SubsystemBase {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void periodic() {
|
public void periodic() {
|
||||||
|
SmartDashboard.putBoolean("Climber Folded", (elbow.isFwdLimitSwitchClosed() == 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user