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/thermalcontroller.hpp b/pid/thermalcontroller.hpp
index 040b222..8089da1 100644
--- a/pid/thermalcontroller.hpp
+++ b/pid/thermalcontroller.hpp
@@ -16,8 +16,8 @@
public:
static std::unique_ptr<PIDController>
createThermalPid(ZoneInterface* owner, const std::string& id,
- const std::vector<std::string>& inputs, float setpoint,
- const ec::pidinfo& initial);
+ const std::vector<std::string>& inputs,
+ double setpoint, const ec::pidinfo& initial);
ThermalController(const std::string& id,
const std::vector<std::string>& inputs,
@@ -27,9 +27,9 @@
{
}
- float inputProc(void) override;
- float setptProc(void) override;
- void outputProc(float value) override;
+ double inputProc(void) override;
+ double setptProc(void) override;
+ void outputProc(double value) override;
private:
std::vector<std::string> _inputs;