[hal,wpilib] Rename Encoder constants to all caps

This commit is contained in:
Peter Johnson
2026-03-14 11:12:57 -07:00
parent f6fdae3212
commit b68fbb1adc
14 changed files with 46 additions and 45 deletions

View File

@@ -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

View File

@@ -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