mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Fixed Java PCM test
Change-Id: I17bee703a05d800461b56bf5e179e8d9977e5dfd
This commit is contained in:
@@ -100,11 +100,17 @@ public class PCMTest extends AbstractComsSetup {
|
||||
reset();
|
||||
compressor.setClosedLoopControl(true);
|
||||
|
||||
// Turn on the compressor
|
||||
fakePressureSwitch.set(true);
|
||||
Timer.delay(kCompressorDelayTime);
|
||||
assertEquals("Compressor did not turn on when the pressure switch turned on.",
|
||||
kCompressorOnVoltage, fakeCompressor.getVoltage(), range);
|
||||
// Turn on the compressor
|
||||
fakePressureSwitch.set(true);
|
||||
Timer.delay(kCompressorDelayTime);
|
||||
assertEquals("Compressor did not turn on when the pressure switch turned on.",
|
||||
kCompressorOnVoltage, fakeCompressor.getVoltage(), range);
|
||||
|
||||
// Turn on the compressor
|
||||
fakePressureSwitch.set(false);
|
||||
Timer.delay(kCompressorDelayTime);
|
||||
assertEquals("Compressor did not turn off when the pressure switch turned off.",
|
||||
kCompressorOffVoltage, fakeCompressor.getVoltage(), range);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,11 +122,9 @@ public class PCMTest extends AbstractComsSetup {
|
||||
|
||||
solenoid1.set(false);
|
||||
solenoid2.set(false);
|
||||
|
||||
Timer.delay(kSolenoidDelayTime);
|
||||
|
||||
assertTrue("Solenoid did not turn off.",solenoid1.get());
|
||||
assertTrue("Solenoid did not turn off.",solenoid2.get());
|
||||
assertTrue("Solenoid #1 did not turn on",fakeSolenoid1.get());
|
||||
assertTrue("Solenoid #2 did not turn off",fakeSolenoid2.get());
|
||||
|
||||
// Turn Solenoid #1 on, and turn Solenoid #2 off
|
||||
solenoid1.set(true);
|
||||
|
||||
Reference in New Issue
Block a user