mirror of
https://github.com/Team4388/2023WayOfTheRobot.git
synced 2026-06-09 00:37:59 -06:00
including ukraine
This commit is contained in:
@@ -147,8 +147,7 @@ public class RobotContainer {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.X_BUTTON)
|
new JoystickButton(getDeadbandedOperatorController(), XboxController.X_BUTTON)
|
||||||
.onTrue(new InstantCommand(() -> m_robotClaw.setClaw(servo_open)));
|
.onTrue(new InstantCommand(() -> m_robotClaw.toggle()));
|
||||||
servo_open = !servo_open;
|
|
||||||
|
|
||||||
new JoystickButton(getDeadbandedOperatorController(), XboxController.A_BUTTON)
|
new JoystickButton(getDeadbandedOperatorController(), XboxController.A_BUTTON)
|
||||||
.onTrue(new InstantCommand(() -> m_robotArm.resetTeleSoftLimit(), m_robotArm));
|
.onTrue(new InstantCommand(() -> m_robotArm.resetTeleSoftLimit(), m_robotArm));
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ public class Claw extends SubsystemBase {
|
|||||||
m_clawMotor.setRaw(open ? 0 : 2000);
|
m_clawMotor.setRaw(open ? 0 : 2000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void toggle() {
|
||||||
|
setClaw(!m_open);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isClawOpen() {
|
public boolean isClawOpen() {
|
||||||
return m_open;
|
return m_open;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user