com.qualcomm.robotcore.hardware

## Class CRServoImplEx

- java.lang.Object
- - com.qualcomm.robotcore.hardware.CRServoImpl
  - - com.qualcomm.robotcore.hardware.CRServoImplEx

- All Implemented Interfaces:
    CRServo, DcMotorSimple, HardwareDevice, PwmControl

      public class CRServoImplEx
      extends CRServoImpl
      implements PwmControl

  CRServoEx provides access to extended functionality on continuous rotation servos. Implementations support both the `CRServo` and `PwmControl` interfaces.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.qualcomm.robotcore.hardware.PwmControl

      `PwmControl.PwmRange`

    - ### Nested classes/interfaces inherited from interface com.qualcomm.robotcore.hardware.DcMotorSimple

      `DcMotorSimple.Direction`

    - ### Nested classes/interfaces inherited from interface com.qualcomm.robotcore.hardware.HardwareDevice

      `HardwareDevice.Manufacturer`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ServoControllerEx` | `controllerEx`

    - ### Fields inherited from class com.qualcomm.robotcore.hardware.CRServoImpl

      `apiPowerMax, apiPowerMin, apiServoPositionMax, apiServoPositionMin, controller, direction, portNumber`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CRServoImplEx(ServoControllerEx controller, int portNumber, DcMotorSimple.Direction direction, ServoConfigurationType servoType)`
    `CRServoImplEx(ServoControllerEx controller, int portNumber, ServoConfigurationType servoType)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `PwmControl.PwmRange` | `getPwmRange()` Returns the current PWM range limits for the servo
    `boolean` | `isPwmEnabled()` Returns whether the PWM is energized for this particular servo
    `void` | `setPwmDisable()` Individually denergizes the PWM for this particular servo
    `void` | `setPwmEnable()` Individually energizes the PWM for this particular servo.
    `void` | `setPwmRange(PwmControl.PwmRange range)` Sets the PWM range limits for the servo

    - ### Methods inherited from class com.qualcomm.robotcore.hardware.CRServoImpl

      `close, getConnectionInfo, getController, getDeviceName, getDirection, getManufacturer, getPortNumber, getPower, getVersion, resetDeviceConfigurationForOpMode, setDirection, setPower`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### controllerEx

          protected ServoControllerEx controllerEx

  - ### Constructor Detail

    - #### CRServoImplEx

          public CRServoImplEx(ServoControllerEx controller,
                               int portNumber,
                               ServoConfigurationType servoType)

    - #### CRServoImplEx

          public CRServoImplEx(ServoControllerEx controller,
                               int portNumber,
                               DcMotorSimple.Direction direction,
                               ServoConfigurationType servoType)

  - ### Method Detail

    - #### setPwmRange

          public void setPwmRange(PwmControl.PwmRange range)

      Description copied from interface: `PwmControl`
      Sets the PWM range limits for the servo
      Specified by:
        `setPwmRange` in interface `PwmControl`
      Parameters:
        `range` - the new PWM range limits for the servo
      See Also:
        `PwmControl.getPwmRange()`

    - #### getPwmRange

          public PwmControl.PwmRange getPwmRange()

      Description copied from interface: `PwmControl`
      Returns the current PWM range limits for the servo
      Specified by:
        `getPwmRange` in interface `PwmControl`
      Returns:
        the current PWM range limits for the servo
      See Also:
        `PwmControl.setPwmRange(PwmRange)`

    - #### setPwmEnable

          public void setPwmEnable()

      Description copied from interface: `PwmControl`
      Individually energizes the PWM for this particular servo.
      Specified by:
        `setPwmEnable` in interface `PwmControl`
      See Also:
        `PwmControl.setPwmDisable()`, `PwmControl.isPwmEnabled()`

    - #### setPwmDisable

          public void setPwmDisable()

      Description copied from interface: `PwmControl`
      Individually denergizes the PWM for this particular servo
      Specified by:
        `setPwmDisable` in interface `PwmControl`
      See Also:
        `PwmControl.setPwmEnable()`

    - #### isPwmEnabled

          public boolean isPwmEnabled()

      Description copied from interface: `PwmControl`
      Returns whether the PWM is energized for this particular servo
      Specified by:
        `isPwmEnabled` in interface `PwmControl`
      See Also:
        `PwmControl.setPwmEnable()`