mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[hal, wpilib] Incorporate pneumatic control type into wpilibc/j (#3728)
This commit is contained in:
@@ -96,7 +96,7 @@ TEST(CTREPCMSimTest, SetCompressorOn) {
|
||||
EXPECT_TRUE(callback.GetLastValue());
|
||||
}
|
||||
|
||||
TEST(CTREPCMSimTest, SetClosedLoopEnabled) {
|
||||
TEST(CTREPCMSimTest, SetEnableDigital) {
|
||||
PneumaticsControlModule pcm;
|
||||
CTREPCMSim sim(pcm);
|
||||
sim.ResetData();
|
||||
@@ -105,12 +105,12 @@ TEST(CTREPCMSimTest, SetClosedLoopEnabled) {
|
||||
auto cb =
|
||||
sim.RegisterClosedLoopEnabledCallback(callback.GetCallback(), false);
|
||||
|
||||
pcm.SetClosedLoopControl(false);
|
||||
EXPECT_FALSE(pcm.GetClosedLoopControl());
|
||||
pcm.DisableCompressor();
|
||||
EXPECT_EQ(pcm.GetCompressorConfigType(), CompressorConfigType::Disabled);
|
||||
|
||||
pcm.SetClosedLoopControl(true);
|
||||
pcm.EnableCompressorDigital();
|
||||
EXPECT_TRUE(sim.GetClosedLoopEnabled());
|
||||
EXPECT_TRUE(pcm.GetClosedLoopControl());
|
||||
EXPECT_EQ(pcm.GetCompressorConfigType(), CompressorConfigType::Digital);
|
||||
EXPECT_TRUE(callback.WasTriggered());
|
||||
EXPECT_TRUE(callback.GetLastValue());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user