public class Servo extends PWM
PWM.PeriodMultiplier
Modifier and Type | Field and Description |
---|---|
protected static double |
kDefaultMaxServoPWM |
protected static double |
kDefaultMinServoPWM |
kDefaultPwmCenter, kDefaultPwmPeriod, kDefaultPwmStepsDown, kPwmDisabled
kAnalogInputChannels, 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, setZeroLatch
checkAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPDPChannel, checkPWMChannel, checkRelayChannel, checkSolenoidChannel, checkSolenoidModule, getDefaultSolenoidModule, setDefaultSolenoidModule
protected 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 Sendable
getSmartDashboardType
in class PWM
public void initTable(edu.wpi.first.wpilibj.tables.ITable subtable)
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
Copyright © 2015. All rights reserved.