Test bench fixes and updates. Attempting to make it possible to have a stable build again. Gyro test still seems a bit unreliable.

Change-Id: I0c140a5263048ff47ed1ec6b243e07baf43ec21e
This commit is contained in:
Patrick
2015-04-10 16:25:20 -04:00
committed by James Kuszmaul
parent 880eae1424
commit 675fbc032c
7 changed files with 82 additions and 75 deletions

View File

@@ -25,7 +25,8 @@ protected:
m_outputA = new DigitalOutput(TestBench::kLoop2OutputChannel);
m_outputB = new DigitalOutput(TestBench::kLoop1OutputChannel);
m_indexOutput = new AnalogOutput(TestBench::kAnalogOutputChannel);
m_outputA->Set(false);
m_outputB->Set(false);
m_encoder = new Encoder(TestBench::kLoop1InputChannel, TestBench::kLoop2InputChannel);
m_indexAnalogTrigger = new AnalogTrigger(TestBench::kFakeAnalogOutputChannel);
m_indexAnalogTrigger->SetLimitsVoltage(2.0, 3.0);
@@ -80,6 +81,7 @@ TEST_F(FakeEncoderTest, TestDefaultState) {
* Test the encoder by setting the digital outputs and reading the value.
*/
TEST_F(FakeEncoderTest, TestCountUp) {
m_encoder->Reset();
Simulate100QuadratureTicks();
EXPECT_FLOAT_EQ(100.0f, m_encoder->Get())