mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[hal,wpilib] Rename Encoder constants to all caps
This commit is contained in:
@@ -144,7 +144,7 @@ void Encoder::InitSendable(wpi::util::SendableBuilder& builder) {
|
||||
int32_t status = 0;
|
||||
HAL_EncoderEncodingType type = HAL_GetEncoderEncodingType(m_encoder, &status);
|
||||
WPILIB_CheckErrorStatus(status, "GetEncodingType");
|
||||
if (type == HAL_EncoderEncodingType::HAL_Encoder_k4X) {
|
||||
if (type == HAL_EncoderEncodingType::HAL_ENCODER_4X_ENCODING) {
|
||||
builder.SetSmartDashboardType("Quadrature Encoder");
|
||||
} else {
|
||||
builder.SetSmartDashboardType("Encoder");
|
||||
@@ -169,13 +169,13 @@ void Encoder::InitEncoder(int aChannel, int bChannel, bool reverseDirection,
|
||||
|
||||
const char* type = "Encoder";
|
||||
switch (encodingType) {
|
||||
case k1X:
|
||||
case EncodingType::X1:
|
||||
type = "Encoder:1x";
|
||||
break;
|
||||
case k2X:
|
||||
case EncodingType::X2:
|
||||
type = "Encoder:2x";
|
||||
break;
|
||||
case k4X:
|
||||
case EncodingType::X4:
|
||||
type = "Encoder:4x";
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user