|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.first.wpilibj.AnalogPotentiometer
public class AnalogPotentiometer
Class for reading analog potentiometers. Analog potentiometers read in an analog voltage that corresponds to a position. Usually the position is either degrees or meters. However, if no conversion is given it remains volts.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface edu.wpi.first.wpilibj.PIDSource |
---|
PIDSource.PIDSourceParameter |
Constructor Summary | |
---|---|
AnalogPotentiometer(int channel)
AnalogPotentiometer constructor. |
|
AnalogPotentiometer(int channel,
double scale)
AnalogPotentiometer constructor. |
|
AnalogPotentiometer(int channel,
double scale,
double offset)
AnalogPotentiometer constructor. |
|
AnalogPotentiometer(int slot,
int channel,
double scale,
double offset)
AnalogPotentiometer constructor. |
Method Summary | |
---|---|
double |
get()
Get the current reading of the potentiomere. |
java.lang.String |
getSmartDashboardType()
|
ITable |
getTable()
|
void |
initTable(ITable subtable)
Initializes a table for this sendable object. |
double |
pidGet()
Implement the PIDSource interface. |
void |
startLiveWindowMode()
Analog Channels don't have to do anything special when entering the LiveWindow. |
void |
stopLiveWindowMode()
Analog Channels don't have to do anything special when exiting the LiveWindow. |
void |
updateTable()
Update the table for this sendable object with the latest values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnalogPotentiometer(int slot, int channel, double scale, double offset)
slot
- The analog module this potentiometer is plugged into.channel
- The analog channel this potentiometer is plugged into.scale
- The scaling to multiply the voltage by to get a meaningful unit.offset
- The offset to add to the scaled value for controlling the zero valuepublic AnalogPotentiometer(int channel, double scale, double offset)
channel
- The analog channel this potentiometer is plugged into.scale
- The scaling to multiply the voltage by to get a meaningful unit.offset
- The offset to add to the scaled value for controlling the zero valuepublic AnalogPotentiometer(int channel, double scale)
channel
- The analog channel this potentiometer is plugged into.scale
- The scaling to multiply the voltage by to get a meaningful unit.public AnalogPotentiometer(int channel)
channel
- The analog channel this potentiometer is plugged into.Method Detail |
---|
public double get()
get
in interface Potentiometer
public double pidGet()
pidGet
in interface PIDSource
public java.lang.String getSmartDashboardType()
getSmartDashboardType
in interface Sendable
public void initTable(ITable subtable)
initTable
in interface Sendable
subtable
- The table to put the values in.public void updateTable()
updateTable
in interface LiveWindowSendable
public ITable getTable()
getTable
in interface Sendable
public void startLiveWindowMode()
startLiveWindowMode
in interface LiveWindowSendable
public void stopLiveWindowMode()
stopLiveWindowMode
in interface LiveWindowSendable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |