mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[hal,wpilib] Rename Encoder constants to all caps
This commit is contained in:
@@ -72,11 +72,11 @@ class Robot : public wpi::TimedRobot {
|
||||
* set this parameter to true, the direction of the encoder will be reversed,
|
||||
* in case it makes more sense mechanically.
|
||||
*
|
||||
* The final (optional) parameter specifies encoding rate (k1X, k2X, or k4X)
|
||||
* and defaults to k4X. Faster (k4X) encoding gives greater positional
|
||||
* The final (optional) parameter specifies encoding rate (X1, X2, or X4)
|
||||
* and defaults to X4. Faster (X4) encoding gives greater positional
|
||||
* precision but more noise in the rate.
|
||||
*/
|
||||
wpi::Encoder m_encoder{1, 2, false, wpi::Encoder::k4X};
|
||||
wpi::Encoder m_encoder{1, 2, false, wpi::Encoder::EncodingType::X4};
|
||||
};
|
||||
|
||||
#ifndef RUNNING_WPILIB_TESTS
|
||||
|
||||
@@ -56,7 +56,7 @@ class Robot : public wpi::TimedRobot {
|
||||
|
||||
// Initializes an encoder on DIO pins 0 and 1
|
||||
// 2X encoding and non-inverted
|
||||
wpi::Encoder m_encoder2x{0, 1, false, wpi::Encoder::EncodingType::k2X};
|
||||
wpi::Encoder m_encoder2x{0, 1, false, wpi::Encoder::EncodingType::X2};
|
||||
};
|
||||
|
||||
#ifndef RUNNING_WPILIB_TESTS
|
||||
|
||||
Reference in New Issue
Block a user