public class Servo extends PWM implements ActuatorModule, AngleSink, AngleSource
PWM.PeriodMultiplier, PWM.PWMChannelInterface.InterfaceType| Modifier and Type | Field and Description |
|---|---|
private static double |
SERVO_ANGLE_RANGE |
private static double |
SERVO_MAX_ANGLE |
private static double |
SERVO_MIN_ANGLE |
protected static double |
SERVO_PWM_DEFAULT_MAX |
protected static double |
SERVO_PWM_DEFAULT_MIN |
m_description, m_disabled, m_table, m_table_listener, PWM_DEFAULT_CENTER, PWM_DEFAULT_PERIOD, PWM_DEFAULT_STEPS_DOWN, PWM_DISABLED_WIDTH, SYSTEM_CLOCK_TICKS_PER_MICROSECm_ifaceType, MAX_ANALOG_IN_CHANNELS, MAX_ANALOG_OUT_CHANNELS, MAX_DIGITAL_CHANNELS, MAX_PWM_CHANNELS, MAX_RELAY_CHANNELS| Constructor and Description |
|---|
Servo(PWM.PWMChannel channel) |
| Modifier and Type | Method and Description |
|---|---|
void |
enableModule()
Enable the module
|
double |
get()
Get the servo position.
|
double |
getAngle()
Get the servo angle.
|
void |
makeSafe()
Make this actuator safe.
|
void |
set(double value)
Set the servo position.
|
void |
setAngle(double degrees)
Set the servo angle.
|
disableModule, eliminateDeadband, free, getCenterPWM, getChannel, getChannelName, getChannelNumber, getModuleEnabled, getPosition, getRaw, getSmartDashboardType, getSpeed, getTable, initTable, setBounds, setPeriodMultiplier, setPosition, setRaw, setSpeed, setZeroLatch, startLiveWindowMode, stopLiveWindowMode, updateTableallocateMXPPin, checkAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPWMChannel, checkRelayChannel, freeMXPPin, getInterfaceTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdisableModule, getModuleEnabledbindValue, bindValueprivate static final double SERVO_MAX_ANGLE
private static final double SERVO_MIN_ANGLE
private static final double SERVO_ANGLE_RANGE
protected static final double SERVO_PWM_DEFAULT_MAX
protected static final double SERVO_PWM_DEFAULT_MIN
public Servo(PWM.PWMChannel channel)
channel - public final void set(double value)
set in interface NumberSinkset in class PWMvalue - Position from 0.0 to 1.0.public final double get()
public final void setAngle(double degrees)
public final double getAngle()
getAngle in interface AngleSourcepublic void enableModule()
enableModule in interface ModuleenableModule in class PWMpublic void makeSafe()
makeSafe in interface ActuatorModule