From 8303b7985071c243b4932c75a342b937e6726065 Mon Sep 17 00:00:00 2001 From: Adam Long Date: Wed, 2 Apr 2014 16:42:21 -0700 Subject: [PATCH] Reverted to the old pot conversion code that worked (may or may not be the issue currently) --- MyRobot.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MyRobot.cpp b/MyRobot.cpp index ee33ace..e4a4e9a 100644 --- a/MyRobot.cpp +++ b/MyRobot.cpp @@ -170,6 +170,14 @@ public: } //}}} //potToDegrees{{{ + float potToDegrees(float a) { + float max = -.0003948; + float min = 5.0245547; + float b = a - max; + min = min - max; // ~5.0027 + max = max - max; //=0 + return 300 - ((b + max) * (300 / min)); + } //}}} //cvt{{{ int cvt(float input){