mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
[hal,wpilib] Rename Encoder constants to all caps
This commit is contained in:
@@ -19,7 +19,8 @@ namespace wpi {
|
||||
*/
|
||||
class CounterBase {
|
||||
public:
|
||||
enum EncodingType { k1X, k2X, k4X };
|
||||
/** The number of edges for the CounterBase to increment or decrement on. */
|
||||
enum class EncodingType { X1, X2, X4 };
|
||||
|
||||
CounterBase() = default;
|
||||
virtual ~CounterBase() = default;
|
||||
|
||||
@@ -44,7 +44,7 @@ class Encoder : public CounterBase,
|
||||
* @param reverseDirection represents the orientation of the encoder and
|
||||
* inverts the output values if necessary so forward
|
||||
* represents positive values.
|
||||
* @param encodingType either k1X, k2X, or k4X to indicate 1X, 2X or 4X
|
||||
* @param encodingType either X1, X2, or X4 to indicate 1X, 2X or 4X
|
||||
* decoding. If 4X is selected, then an encoder FPGA
|
||||
* object is used and the returned counts will be 4x
|
||||
* the encoder spec'd value since all rising and
|
||||
@@ -54,7 +54,7 @@ class Encoder : public CounterBase,
|
||||
* be double (2x) the spec'd count.
|
||||
*/
|
||||
Encoder(int aChannel, int bChannel, bool reverseDirection = false,
|
||||
EncodingType encodingType = k4X);
|
||||
EncodingType encodingType = EncodingType::X4);
|
||||
|
||||
Encoder(Encoder&&) = default;
|
||||
Encoder& operator=(Encoder&&) = default;
|
||||
@@ -256,7 +256,7 @@ class Encoder : public CounterBase,
|
||||
* @param bChannel The b channel.
|
||||
* @param reverseDirection If true, counts down instead of up (this is all
|
||||
* relative)
|
||||
* @param encodingType either k1X, k2X, or k4X to indicate 1X, 2X or 4X
|
||||
* @param encodingType either X1, X2, or X4 to indicate 1X, 2X or 4X
|
||||
* decoding. If 4X is selected, then an encoder FPGA
|
||||
* object is used and the returned counts will be 4x
|
||||
* the encoder spec'd value since all rising and
|
||||
|
||||
Reference in New Issue
Block a user