#include <AnalogPotentiometer.h>
Public Member Functions | |
AnalogPotentiometer (int slot, int channel, double scale, double offset) | |
AnalogPotentiometer (int channel, double scale, double offset) | |
AnalogPotentiometer (int channel, double scale) | |
AnalogPotentiometer (int channel) | |
double | Get () |
double | PIDGet () |
std::string | GetSmartDashboardType () |
void | InitTable (ITable *subtable) |
void | UpdateTable () |
ITable * | GetTable () |
void | StartLiveWindowMode () |
void | StopLiveWindowMode () |
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.
AnalogPotentiometer::AnalogPotentiometer | ( | int | slot, |
int | channel, | ||
double | scale, | ||
double | offset | ||
) |
AnalogPotentiometer constructor.
Use the scaling and offset values so that the output produces meaningful values. I.E: you have a 270 degree potentiometer and you want the output to be degrees with the halfway point as 0 degrees. The scale value is 270.0(degrees)/5.0(volts) and the offset is -135.0 since the halfway point after scaling is 135 degrees.
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 value |
AnalogPotentiometer::AnalogPotentiometer | ( | int | channel, |
double | scale, | ||
double | offset | ||
) |
AnalogPotentiometer constructor.
Use the scaling and offset values so that the output produces meaningful values. I.E: you have a 270 degree potentiometer and you want the output to be degrees with the halfway point as 0 degrees. The scale value is 270.0(degrees)/5.0(volts) and the offset is -135.0 since the halfway point after scaling is 135 degrees.
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 value |
AnalogPotentiometer::AnalogPotentiometer | ( | int | channel, |
double | scale | ||
) |
AnalogPotentiometer constructor.
Use the scaling and offset values so that the output produces meaningful values. I.E: you have a 270 degree potentiometer and you want the output to be degrees with the halfway point as 0 degrees. The scale value is 270.0(degrees)/5.0(volts) and the offset is -135.0 since the halfway point after scaling is 135 degrees.
channel | The analog channel this potentiometer is plugged into. |
scale | The scaling to multiply the voltage by to get a meaningful unit. |
AnalogPotentiometer::AnalogPotentiometer | ( | int | channel | ) |
AnalogPotentiometer constructor.
channel | The analog channel this potentiometer is plugged into. |
double AnalogPotentiometer::Get | ( | ) |
Get the current reading of the potentiomere.
ITable * AnalogPotentiometer::GetTable | ( | ) |
void AnalogPotentiometer::InitTable | ( | ITable * | subtable | ) |
double AnalogPotentiometer::PIDGet | ( | ) |
Implement the PIDSource interface.
void AnalogPotentiometer::StartLiveWindowMode | ( | ) |
Analog Channels don't have to do anything special when entering the LiveWindow.
void AnalogPotentiometer::StopLiveWindowMode | ( | ) |
Analog Channels don't have to do anything special when exiting the LiveWindow.
void AnalogPotentiometer::UpdateTable | ( | ) |