Пример #1
0
  /** Change things based on the positions of the buttons */
  private void buttonPress() {

    if (js.getStick().getRawButton(JoystickListener.Arm.CLOSE_CLAW)) {
      closeClaw();
    }
    if (js.getStick().getRawButton(JoystickListener.Arm.OPEN_CLAW)) {
      openClaw();
    }
    if (js.getStick().getRawButton(JoystickListener.Arm.CLOSE_ARM)) {
      closeArm();
    }
    if (js.getStick().getRawButton(JoystickListener.Arm.OPEN_ARM)) {
      openArm();
    }
    if (js.getStick().getRawButton(JoystickListener.Arm.ARM_TURBO)) {
      turbomode = true;
    } else {
      turbomode = false;
    }
  }
Пример #2
0
 /** Set the speed of the arm */
 private void setArm() {
   moveArm(js.getStick().getRawAxis(JoystickListener.Arm.ARM_AXIS));
 }