[hal,wpilib] Rename REVPH compressor constants to all caps

This commit is contained in:
Peter Johnson
2026-03-14 12:11:25 -07:00
parent c18f811ea7
commit 68ca74c129
16 changed files with 72 additions and 72 deletions

View File

@@ -15,17 +15,17 @@
using namespace wpi;
static_assert(
static_cast<int>(CompressorConfigType::Disabled) ==
HAL_REVPHCompressorConfigType::HAL_REVPHCompressorConfigType_kDisabled);
static_cast<int>(CompressorConfigType::DISABLED) ==
HAL_REVPHCompressorConfigType::HAL_REVPH_COMPRESSOR_CONFIG_DISABLED);
static_assert(
static_cast<int>(CompressorConfigType::Digital) ==
HAL_REVPHCompressorConfigType::HAL_REVPHCompressorConfigType_kDigital);
static_cast<int>(CompressorConfigType::DIGITAL) ==
HAL_REVPHCompressorConfigType::HAL_REVPH_COMPRESSOR_CONFIG_DIGITAL);
static_assert(
static_cast<int>(CompressorConfigType::Analog) ==
HAL_REVPHCompressorConfigType::HAL_REVPHCompressorConfigType_kAnalog);
static_cast<int>(CompressorConfigType::ANALOG) ==
HAL_REVPHCompressorConfigType::HAL_REVPH_COMPRESSOR_CONFIG_ANALOG);
static_assert(
static_cast<int>(CompressorConfigType::Hybrid) ==
HAL_REVPHCompressorConfigType::HAL_REVPHCompressorConfigType_kHybrid);
static_cast<int>(CompressorConfigType::HYBRID) ==
HAL_REVPHCompressorConfigType::HAL_REVPH_COMPRESSOR_CONFIG_HYBRID);
std::shared_ptr<PneumaticsBase> PneumaticsBase::GetForType(
int busId, int module, PneumaticsModuleType moduleType) {

View File

@@ -128,8 +128,8 @@ CompressorConfigType PneumaticsControlModule::GetCompressorConfigType() const {
int32_t status = 0;
auto result = HAL_GetCTREPCMClosedLoopControl(m_handle, &status);
WPILIB_ReportError(status, "Module {}", m_module);
return result ? CompressorConfigType::Digital
: CompressorConfigType::Disabled;
return result ? CompressorConfigType::DIGITAL
: CompressorConfigType::DISABLED;
}
bool PneumaticsControlModule::GetPressureSwitch() const {