mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
Changed AnalogPotentiometer to use angle specification and rail voltage.
Change-Id: I98f2c1c16726496a69c86174cdb870c74e05822c
This commit is contained in:
@@ -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.";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user