public class AnalogPotentiometer extends Object implements Potentiometer, LiveWindowSendable
PIDSource.PIDSourceParameter
Constructor and Description |
---|
AnalogPotentiometer(AnalogInput input)
AnalogPotentiometer constructor.
|
AnalogPotentiometer(AnalogInput input,
double scale)
AnalogPotentiometer constructor.
|
AnalogPotentiometer(AnalogInput input,
double fullRange,
double offset)
AnalogPotentiometer constructor.
|
AnalogPotentiometer(int channel)
AnalogPotentiometer constructor.
|
AnalogPotentiometer(int channel,
double scale)
AnalogPotentiometer constructor.
|
AnalogPotentiometer(int channel,
double fullRange,
double offset)
AnalogPotentiometer constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
free() |
double |
get()
Get the current reading of the potentiometer.
|
String |
getSmartDashboardType()
Live Window code, only does anything if live window is activated.
|
edu.wpi.first.wpilibj.tables.ITable |
getTable() |
void |
initTable(edu.wpi.first.wpilibj.tables.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.
|
public AnalogPotentiometer(int channel, double fullRange, double offset)
channel
- The analog channel this potentiometer is plugged into.fullRange
- The scaling to multiply the fraction by to get a meaningful unit.offset
- The offset to add to the scaled value for controlling the zero valuepublic AnalogPotentiometer(AnalogInput input, double fullRange, double offset)
input
- The AnalogInput
this potentiometer is plugged into.fullRange
- The scaling to multiply the fraction 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(AnalogInput input, double scale)
input
- The AnalogInput
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.public AnalogPotentiometer(AnalogInput input)
input
- The AnalogInput
this potentiometer is plugged into.public double get()
get
in interface Potentiometer
public double pidGet()
public String getSmartDashboardType()
getSmartDashboardType
in interface Sendable
public void initTable(edu.wpi.first.wpilibj.tables.ITable subtable)
public void updateTable()
updateTable
in interface LiveWindowSendable
public edu.wpi.first.wpilibj.tables.ITable getTable()
public void free()
public void startLiveWindowMode()
startLiveWindowMode
in interface LiveWindowSendable
public void stopLiveWindowMode()
stopLiveWindowMode
in interface LiveWindowSendable
Copyright © 2015. All rights reserved.