/**
   * Change the control mode of this Jaguar object.
   *
   * <p>After changing modes, configure any PID constants or other settings needed and then
   * enableControl() to actually change the mode on the Jaguar.
   *
   * @param controlMode The new mode.
   */
  public void changeControlMode(ControlMode controlMode) throws CANTimeoutException {
    // Disable the previous mode
    disableControl();

    // Update the local mode
    m_controlMode = controlMode;
  }
Esempio n. 2
0
 /** Disables the climber closed loop puts it into open loop. */
 public void disableClosedLoop() {
   if (ClimbJag != null) {
     try {
       ClimbJag.disableControl();
       ClimbJag.changeControlMode(CANJaguar.ControlMode.kPercentVbus);
       m_closedLoop = false;
     } catch (CANTimeoutException ex) {
       m_fault = true;
       System.err.println("CAN timeout");
     }
   }
 }
 /**
  * Common interface for disabling a motor.
  *
  * <p>Needed by the SpeedControl interface (swallows CANTimeoutExceptions).
  *
  * @deprecated Use disableControl instead.
  */
 public void disable() {
   try {
     disableControl();
   } catch (CANTimeoutException e) {
   }
 }