Reflowed comments and removed commented out code (#735)

This commit is contained in:
Tyler Veness
2017-11-16 00:33:51 -08:00
committed by Peter Johnson
parent 1e8d18b328
commit c663d7cd16
103 changed files with 784 additions and 778 deletions

View File

@@ -18,30 +18,30 @@
namespace frc {
/**
* Class for reading analog potentiometers. Analog potentiometers read
* in an analog voltage that corresponds to a position. The position is
* in whichever units you choose, by way of the scaling and offset
* constants passed to the constructor.
* Class for reading analog potentiometers. Analog potentiometers read in an
* analog voltage that corresponds to a position. The position is in whichever
* units you choose, by way of the scaling and offset constants passed to the
* constructor.
*/
class AnalogPotentiometer : public Potentiometer, public LiveWindowSendable {
public:
/**
* AnalogPotentiometer constructor.
*
* Use the fullRange 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 fullRange value is 270.0(degrees) and the offset is
* -135.0 since the halfway point after scaling is 135 degrees.
* Use the fullRange 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 fullRange value is
* 270.0 degrees and the offset is -135.0 since the halfway point after
* scaling is 135 degrees.
*
* This will calculate the result from the fullRange times the
* fraction of the supply voltage, plus the offset.
* This will calculate the result from the fullRange times the fraction of the
* supply voltage, plus the offset.
*
* @param channel The analog channel this potentiometer is plugged into.
* @param channel The analog channel this potentiometer is plugged into.
* @param fullRange The scaling to multiply the voltage by to get a meaningful
* unit.
* @param offset The offset to add to the scaled value for controlling the
* zero value
* unit.
* @param offset The offset to add to the scaled value for controlling the
* zero value.
*/
explicit AnalogPotentiometer(int channel, double fullRange = 1.0,
double offset = 0.0);