This commit is contained in:
ryan123rudder
2022-03-05 23:43:29 -07:00
parent 33f59d4931
commit 9fe5dfd086
2 changed files with 4 additions and 10 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ public final class Constants {
/* TODO: Update motor IDS */
public static final int SHOULDER_ID = 1;
public static final int ELBOW_ID = 3;
public static final int GYRO_ID = -1;
public static final int GYRO_ID = 14;
// TODO Update this stuff too
public static final double UPPER_ARM_LENGTH = 26; // Units should be in cm
@@ -105,23 +105,17 @@ public class Claws extends SubsystemBase {
* @param limit The current limit.
* @return Whether to interrupt the RunClaw command or not.
*/
public boolean checkSwitchAndCurrent(ClawType which) {
// if still calibrating, stop RunClaw
/*if (((Double) m_leftOffset == null) || ((Double) m_rightOffset == null)) {
return true;
}*/
public boolean checkSwitchAndCurrent(ClawType which) {
if (which == ClawType.LEFT) {
if (m_leftLimitSwitchF.isPressed() || m_leftLimitSwitchR.isPressed() || m_leftClaw.getOutputCurrent() >= ClawConstants.CURRENT_LIMIT) {
return true;
}
} else if (which == ClawType.RIGHT) {
}
else if (which == ClawType.RIGHT) {
if (m_rightLimitSwitchF.isPressed() || m_rightLimitSwitchR.isPressed() || m_rightClaw.getOutputCurrent() >= ClawConstants.CURRENT_LIMIT) {
return true;
}
}
return false;
}