public class Servo extends PWM
PWM.PeriodMultiplier| Modifier and Type | Field and Description |
|---|---|
protected static double |
kDefaultMaxServoPWM |
protected static double |
kDefaultMinServoPWM |
kDefaultPwmCenter, kDefaultPwmPeriod, kDefaultPwmStepsDown, kPwmDisabledkAnalogInputChannels, kAnalogOutputChannels, kDigitalChannels, kPDPChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond| Constructor and Description |
|---|
Servo(int channel)
|
| Modifier and Type | Method and Description |
|---|---|
double |
get()
Get the servo position.
|
double |
getAngle()
Get the servo angle.
|
String |
getSmartDashboardType() |
void |
initTable(edu.wpi.first.wpilibj.tables.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.
|
enableDeadbandElimination, free, getChannel, getPosition, getRaw, getSpeed, getTable, setBounds, setBounds, setPeriodMultiplier, setPosition, setRaw, setZeroLatchcheckAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPDPChannel, checkPWMChannel, checkRelayChannel, checkSolenoidChannel, checkSolenoidModule, getDefaultSolenoidModule, setDefaultSolenoidModuleprotected static final double kDefaultMaxServoPWM
protected static final double kDefaultMinServoPWM
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 String getSmartDashboardType()
getSmartDashboardType in interface SendablegetSmartDashboardType in class PWMpublic void initTable(edu.wpi.first.wpilibj.tables.ITable subtable)
public void updateTable()
updateTable in interface LiveWindowSendableupdateTable in class PWMpublic void startLiveWindowMode()
startLiveWindowMode in interface LiveWindowSendablestartLiveWindowMode in class PWMpublic void stopLiveWindowMode()
stopLiveWindowMode in interface LiveWindowSendablestopLiveWindowMode in class PWMCopyright © 2015. All rights reserved.