[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

@@ -105,11 +105,11 @@ TEST(CTREPCMSimTest, SetEnableDigital) {
sim.RegisterClosedLoopEnabledCallback(callback.GetCallback(), false);
pcm.DisableCompressor();
EXPECT_EQ(pcm.GetCompressorConfigType(), CompressorConfigType::Disabled);
EXPECT_EQ(pcm.GetCompressorConfigType(), CompressorConfigType::DISABLED);
pcm.EnableCompressorDigital();
EXPECT_TRUE(sim.GetClosedLoopEnabled());
EXPECT_EQ(pcm.GetCompressorConfigType(), CompressorConfigType::Digital);
EXPECT_EQ(pcm.GetCompressorConfigType(), CompressorConfigType::DIGITAL);
EXPECT_TRUE(callback.WasTriggered());
EXPECT_TRUE(callback.GetLastValue());
}

View File

@@ -105,15 +105,15 @@ TEST(REVPHSimTest, SetEnableDigital) {
sim.RegisterCompressorConfigTypeCallback(callback.GetCallback(), false);
ph.DisableCompressor();
EXPECT_EQ(ph.GetCompressorConfigType(), CompressorConfigType::Disabled);
EXPECT_EQ(ph.GetCompressorConfigType(), CompressorConfigType::DISABLED);
ph.EnableCompressorDigital();
EXPECT_EQ(sim.GetCompressorConfigType(),
static_cast<int>(CompressorConfigType::Digital));
EXPECT_EQ(ph.GetCompressorConfigType(), CompressorConfigType::Digital);
static_cast<int>(CompressorConfigType::DIGITAL));
EXPECT_EQ(ph.GetCompressorConfigType(), CompressorConfigType::DIGITAL);
EXPECT_TRUE(callback.WasTriggered());
EXPECT_EQ(callback.GetLastValue(),
static_cast<int>(CompressorConfigType::Digital));
static_cast<int>(CompressorConfigType::DIGITAL));
}
TEST(REVPHSimTest, SetEnableAnalog) {
@@ -126,15 +126,15 @@ TEST(REVPHSimTest, SetEnableAnalog) {
sim.RegisterCompressorConfigTypeCallback(callback.GetCallback(), false);
ph.DisableCompressor();
EXPECT_EQ(ph.GetCompressorConfigType(), CompressorConfigType::Disabled);
EXPECT_EQ(ph.GetCompressorConfigType(), CompressorConfigType::DISABLED);
ph.EnableCompressorAnalog(1_psi, 2_psi);
EXPECT_EQ(sim.GetCompressorConfigType(),
static_cast<int>(CompressorConfigType::Analog));
EXPECT_EQ(ph.GetCompressorConfigType(), CompressorConfigType::Analog);
static_cast<int>(CompressorConfigType::ANALOG));
EXPECT_EQ(ph.GetCompressorConfigType(), CompressorConfigType::ANALOG);
EXPECT_TRUE(callback.WasTriggered());
EXPECT_EQ(callback.GetLastValue(),
static_cast<int>(CompressorConfigType::Analog));
static_cast<int>(CompressorConfigType::ANALOG));
}
TEST(REVPHSimTest, SetEnableHybrid) {
@@ -147,15 +147,15 @@ TEST(REVPHSimTest, SetEnableHybrid) {
sim.RegisterCompressorConfigTypeCallback(callback.GetCallback(), false);
ph.DisableCompressor();
EXPECT_EQ(ph.GetCompressorConfigType(), CompressorConfigType::Disabled);
EXPECT_EQ(ph.GetCompressorConfigType(), CompressorConfigType::DISABLED);
ph.EnableCompressorHybrid(1_psi, 2_psi);
EXPECT_EQ(sim.GetCompressorConfigType(),
static_cast<int>(CompressorConfigType::Hybrid));
EXPECT_EQ(ph.GetCompressorConfigType(), CompressorConfigType::Hybrid);
static_cast<int>(CompressorConfigType::HYBRID));
EXPECT_EQ(ph.GetCompressorConfigType(), CompressorConfigType::HYBRID);
EXPECT_TRUE(callback.WasTriggered());
EXPECT_EQ(callback.GetLastValue(),
static_cast<int>(CompressorConfigType::Hybrid));
static_cast<int>(CompressorConfigType::HYBRID));
}
TEST(REVPHSimTest, SetPressureSwitchEnabled) {