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/conf.hpp b/conf.hpp
index 6e2dc32..c251efc 100644
--- a/conf.hpp
+++ b/conf.hpp
@@ -30,7 +30,7 @@
{
std::string type; // fan or margin or temp?
std::vector<std::string> inputs; // one or more sensors.
- float setpoint; // initial setpoint for thermal.
+ double setpoint; // initial setpoint for thermal.
union
{
ec::pidinfo pidInfo; // pid details
@@ -46,10 +46,10 @@
struct ZoneConfig
{
/* The minimum RPM value we would ever want. */
- float minthermalrpm;
+ double minthermalrpm;
/* If the sensors are in fail-safe mode, this is the percentage to use. */
- float failsafepercent;
+ double failsafepercent;
};
using PIDConf = std::map<std::string, struct ControllerInfo>;