mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[hal,wpilib] Rename REVPH compressor constants to all caps
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user