mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
[hal,wpilib] Rename REVPH compressor constants to all caps
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -10,13 +10,13 @@ namespace wpi {
|
||||
*/
|
||||
enum class CompressorConfigType {
|
||||
/// Disabled.
|
||||
Disabled = 0,
|
||||
DISABLED = 0,
|
||||
/// Digital.
|
||||
Digital = 1,
|
||||
DIGITAL = 1,
|
||||
/// Analog.
|
||||
Analog = 2,
|
||||
ANALOG = 2,
|
||||
/// Hybrid.
|
||||
Hybrid = 3
|
||||
HYBRID = 3
|
||||
};
|
||||
|
||||
} // namespace wpi
|
||||
|
||||
Reference in New Issue
Block a user