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/ec/stepwise.hpp b/pid/ec/stepwise.hpp
index 4034b47..bc7c204 100644
--- a/pid/ec/stepwise.hpp
+++ b/pid/ec/stepwise.hpp
@@ -26,13 +26,13 @@
struct StepwiseInfo
{
- float ts; // sample time in seconds
- float reading[maxStepwisePoints];
- float output[maxStepwisePoints];
- float positiveHysteresis;
- float negativeHysteresis;
+ double ts; // sample time in seconds
+ double reading[maxStepwisePoints];
+ double output[maxStepwisePoints];
+ double positiveHysteresis;
+ double negativeHysteresis;
};
-float stepwise(const ec::StepwiseInfo& info, float value);
+double stepwise(const ec::StepwiseInfo& info, double value);
} // namespace ec
\ No newline at end of file