Changed AnalogPotentiometer to use angle specification and rail voltage.

Change-Id: I98f2c1c16726496a69c86174cdb870c74e05822c
This commit is contained in:
Colby Skeggs
2014-10-23 16:42:15 +00:00
parent 5893d28f39
commit 2ae8f40a58
5 changed files with 75 additions and 62 deletions

View File

@@ -10,7 +10,7 @@
#include "TestBench.h"
#include "gtest/gtest.h"
static const double kScale = 54.0;
static const double kScale = 270.0;
static const double kVoltage = 3.33;
static const double kAngle = 180.0;
@@ -40,6 +40,6 @@ TEST_F(AnalogPotentiometerTest, TestInitialSettings) {
TEST_F(AnalogPotentiometerTest,TestRangeValues) {
m_fakePot->SetVoltage(kVoltage);
Wait(0.1);
EXPECT_NEAR(kAngle, m_pot->Get(), 1.0)
EXPECT_NEAR(kAngle, m_pot->Get(), 2.0)
<< "The potentiometer did not measure the correct angle.";
}