|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.first.wpilibj.SensorBase
edu.wpi.first.wpilibj.PWM
edu.wpi.first.wpilibj.Servo
public class Servo
Standard hobby style servo. The range parameters default to the appropriate values for the Hitec HS-322HD servo provided in the FIRST Kit of Parts in 2008.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj.PWM |
---|
PWM.PeriodMultiplier |
Field Summary |
---|
Fields inherited from class edu.wpi.first.wpilibj.PWM |
---|
kDefaultPwmCenter, kDefaultPwmPeriod, kDefaultPwmStepsDown, kPwmDisabled |
Fields inherited from class edu.wpi.first.wpilibj.SensorBase |
---|
kAnalogChannels, kAnalogModules, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond |
Constructor Summary | |
---|---|
Servo(int channel)
Constructor that assumes the default digital module. |
|
Servo(int slot,
int channel)
Constructor that specifies the digital module. |
Method Summary | |
---|---|
double |
get()
Get the servo position. |
double |
getAngle()
Get the servo angle. |
java.lang.String |
getSmartDashboardType()
|
void |
initTable(ITable subtable)
Initializes a table for this sendable object. |
void |
set(double value)
Set the servo position. |
void |
setAngle(double degrees)
Set the servo angle. |
void |
startLiveWindowMode()
Start having this sendable object automatically respond to value changes reflect the value on the table. |
void |
stopLiveWindowMode()
Stop having this sendable object automatically respond to value changes. |
void |
updateTable()
Update the table for this sendable object with the latest values. |
Methods inherited from class edu.wpi.first.wpilibj.PWM |
---|
enableDeadbandElimination, free, getChannel, getModuleNumber, getPosition, getRaw, getSpeed, getTable, setBounds, setPeriodMultiplier, setPosition, setRaw |
Methods inherited from class edu.wpi.first.wpilibj.SensorBase |
---|
checkAnalogChannel, checkAnalogModule, checkDigitalChannel, checkDigitalModule, checkPWMChannel, checkPWMModule, checkRelayChannel, checkRelayModule, checkSolenoidChannel, checkSolenoidModule, getDefaultAnalogModule, getDefaultDigitalModule, getDefaultSolenoidModule, setDefaultAnalogModule, setDefaultDigitalModule, setDefaultSolenoidModule |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Servo(int channel)
channel
- The PWM channel on the digital module to which the servo is attached.public Servo(int slot, int channel)
slot
- The slot in the chassis that the digital module is plugged into.channel
- The PWM channel on the digital module to which the servo is attached.Method Detail |
---|
public void set(double value)
value
- Position from 0.0 to 1.0.public double get()
public void setAngle(double degrees)
degrees
- The angle in degrees to set the servo.public double getAngle()
public java.lang.String getSmartDashboardType()
getSmartDashboardType
in interface Sendable
getSmartDashboardType
in class PWM
public void initTable(ITable subtable)
initTable
in interface Sendable
initTable
in class PWM
subtable
- The table to put the values in.public void updateTable()
updateTable
in interface LiveWindowSendable
updateTable
in class PWM
public void startLiveWindowMode()
startLiveWindowMode
in interface LiveWindowSendable
startLiveWindowMode
in class PWM
public void stopLiveWindowMode()
stopLiveWindowMode
in interface LiveWindowSendable
stopLiveWindowMode
in class PWM
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |