public class CRServoImplEx extends CRServoImpl implements PwmControl
CRServo
and PwmControl
interfaces.PwmControl.PwmRange
DcMotorSimple.Direction
HardwareDevice.Manufacturer
Modifier and Type | Field and Description |
---|---|
protected ServoControllerEx |
controllerEx |
apiPowerMax, apiPowerMin, apiServoPositionMax, apiServoPositionMin, controller, direction, portNumber
Constructor and Description |
---|
CRServoImplEx(ServoControllerEx controller,
int portNumber,
DcMotorSimple.Direction direction,
ServoConfigurationType servoType) |
CRServoImplEx(ServoControllerEx controller,
int portNumber,
ServoConfigurationType servoType) |
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
|
close, getConnectionInfo, getController, getDeviceName, getDirection, getManufacturer, getPortNumber, getPower, getVersion, resetDeviceConfigurationForOpMode, setDirection, setPower
protected ServoControllerEx controllerEx
public CRServoImplEx(ServoControllerEx controller, int portNumber, ServoConfigurationType servoType)
public CRServoImplEx(ServoControllerEx controller, int portNumber, DcMotorSimple.Direction direction, ServoConfigurationType servoType)
public void setPwmRange(PwmControl.PwmRange range)
PwmControl
setPwmRange
in interface PwmControl
range
- the new PWM range limits for the servoPwmControl.getPwmRange()
public PwmControl.PwmRange getPwmRange()
PwmControl
getPwmRange
in interface PwmControl
PwmControl.setPwmRange(PwmRange)
public void setPwmEnable()
PwmControl
setPwmEnable
in interface PwmControl
PwmControl.setPwmDisable()
,
PwmControl.isPwmEnabled()
public void setPwmDisable()
PwmControl
setPwmDisable
in interface PwmControl
PwmControl.setPwmEnable()
public boolean isPwmEnabled()
PwmControl
isPwmEnabled
in interface PwmControl
PwmControl.setPwmEnable()