mirror of
https://github.com/Team4388/RiseOfRidgebotics2020.git
synced 2026-06-09 00:38:00 -06:00
Merge pull request #47 from Team4388/CAN-and-Limits
CAN IDs and Limit Switches
This commit is contained in:
@@ -144,11 +144,11 @@ public final class Constants {
|
||||
}
|
||||
|
||||
public static final class ClimberConstants {
|
||||
public static final int CLIMBER_SPARK_ID = -10;
|
||||
public static final int CLIMBER_SPARK_ID = 14;
|
||||
}
|
||||
|
||||
public static final class LevelerConstants {
|
||||
public static final int LEVELER_CAN_ID = -1;
|
||||
public static final int LEVELER_CAN_ID = 15;
|
||||
}
|
||||
|
||||
public static final class StorageConstants {
|
||||
@@ -157,7 +157,7 @@ public final class Constants {
|
||||
public static final double STORAGE_FULL_BALL = 7;
|
||||
public static final double STORAGE_SPEED = 0.5;
|
||||
public static final double STORAGE_TIMEOUT = 2000;
|
||||
|
||||
|
||||
/* Ball Indexes */
|
||||
public static final int BEAM_SENSOR_DIO_0 = 0;
|
||||
public static final int BEAM_SENSOR_DIO_1 = 1;
|
||||
|
||||
@@ -31,10 +31,10 @@ public class Climber extends SubsystemBase {
|
||||
m_climberMotor.setIdleMode(IdleMode.kBrake);
|
||||
m_climberMotor.setInverted(false);
|
||||
|
||||
m_climberForwardLimit = m_climberMotor.getForwardLimitSwitch(LimitSwitchPolarity.kNormallyClosed);
|
||||
m_climberReverseLimit = m_climberMotor.getReverseLimitSwitch(LimitSwitchPolarity.kNormallyClosed);
|
||||
m_climberForwardLimit.enableLimitSwitch(false);
|
||||
m_climberReverseLimit.enableLimitSwitch(false);
|
||||
m_climberForwardLimit = m_climberMotor.getForwardLimitSwitch(LimitSwitchPolarity.kNormallyOpen);
|
||||
m_climberReverseLimit = m_climberMotor.getReverseLimitSwitch(LimitSwitchPolarity.kNormallyOpen);
|
||||
m_climberForwardLimit.enableLimitSwitch(true);
|
||||
m_climberReverseLimit.enableLimitSwitch(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -41,9 +41,9 @@ public class Intake extends SubsystemBase {
|
||||
m_extenderMotor.setInverted(false);
|
||||
|
||||
m_extenderForwardLimit = m_extenderMotor.getForwardLimitSwitch(LimitSwitchPolarity.kNormallyClosed);
|
||||
m_extenderReverseLimit = m_extenderMotor.getReverseLimitSwitch(LimitSwitchPolarity.kNormallyClosed);
|
||||
m_extenderForwardLimit.enableLimitSwitch(false);
|
||||
m_extenderReverseLimit.enableLimitSwitch(false);
|
||||
m_extenderReverseLimit = m_extenderMotor.getReverseLimitSwitch(LimitSwitchPolarity.kNormallyOpen);
|
||||
m_extenderForwardLimit.enableLimitSwitch(true);
|
||||
m_extenderReverseLimit.enableLimitSwitch(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user