mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpilib, hal] High Level REV PH changes (#3792)
More functionality was implemented at the HAL level, so expose that to the wpilib level. This also does units changes for all the PH related functionality.
This commit is contained in:
@@ -143,7 +143,7 @@ TEST(CTREPCMSimTest, SetCompressorCurrent) {
|
||||
|
||||
sim.SetCompressorCurrent(35.04);
|
||||
EXPECT_EQ(35.04, sim.GetCompressorCurrent());
|
||||
EXPECT_EQ(35.04, pcm.GetCompressorCurrent());
|
||||
EXPECT_EQ(35.04_A, pcm.GetCompressorCurrent());
|
||||
EXPECT_TRUE(callback.WasTriggered());
|
||||
EXPECT_EQ(35.04, callback.GetLastValue());
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ TEST(REVPHSimTest, SetEnableAnalog) {
|
||||
ph.DisableCompressor();
|
||||
EXPECT_EQ(ph.GetCompressorConfigType(), CompressorConfigType::Disabled);
|
||||
|
||||
ph.EnableCompressorAnalog(1, 2);
|
||||
ph.EnableCompressorAnalog(1_V, 2_V);
|
||||
EXPECT_EQ(sim.GetCompressorConfigType(),
|
||||
static_cast<int>(CompressorConfigType::Analog));
|
||||
EXPECT_EQ(ph.GetCompressorConfigType(), CompressorConfigType::Analog);
|
||||
@@ -150,7 +150,7 @@ TEST(REVPHSimTest, SetEnableHybrid) {
|
||||
ph.DisableCompressor();
|
||||
EXPECT_EQ(ph.GetCompressorConfigType(), CompressorConfigType::Disabled);
|
||||
|
||||
ph.EnableCompressorHybrid(1, 2);
|
||||
ph.EnableCompressorHybrid(1_V, 2_V);
|
||||
EXPECT_EQ(sim.GetCompressorConfigType(),
|
||||
static_cast<int>(CompressorConfigType::Hybrid));
|
||||
EXPECT_EQ(ph.GetCompressorConfigType(), CompressorConfigType::Hybrid);
|
||||
@@ -187,7 +187,7 @@ TEST(REVPHSimTest, SetCompressorCurrent) {
|
||||
|
||||
sim.SetCompressorCurrent(35.04);
|
||||
EXPECT_EQ(35.04, sim.GetCompressorCurrent());
|
||||
EXPECT_EQ(35.04, ph.GetCompressorCurrent());
|
||||
EXPECT_EQ(35.04_A, ph.GetCompressorCurrent());
|
||||
EXPECT_TRUE(callback.WasTriggered());
|
||||
EXPECT_EQ(35.04, callback.GetLastValue());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user