Move all floats to doubles
The code was developed initially around a pid loop implemented using
floats. Therefore, the code was converting back and forth between
double for sensor values as inputs and outputs from this PID loop.
Change-Id: I2d2919e1165103040729c9f16bb84fde3dd6b81b
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/pid/stepwisecontroller.hpp b/pid/stepwisecontroller.hpp
index 37606c3..4aa8116 100644
--- a/pid/stepwisecontroller.hpp
+++ b/pid/stepwisecontroller.hpp
@@ -26,9 +26,9 @@
{
}
- float inputProc(void) override;
+ double inputProc(void) override;
- void outputProc(float value) override;
+ void outputProc(double value) override;
void process(void) override;
@@ -50,6 +50,6 @@
ec::StepwiseInfo _stepwise_info;
std::string _id;
std::vector<std::string> _inputs;
- float lastInput = std::numeric_limits<float>::quiet_NaN();
- float lastOutput = std::numeric_limits<float>::quiet_NaN();
+ double lastInput = std::numeric_limits<double>::quiet_NaN();
+ double lastOutput = std::numeric_limits<double>::quiet_NaN();
};