Add stepwise controller

This adds the ability to use stepwise curves alongside
pid control. This creates a base controller class that
pidcontroller and stepwise controller inherit from.

Note: Hysteresis to come in follow-on patch

Tested-by:
Created a stepwise controller and noticed that when it
crossed a threshold that it contributed to the pwm setting.

Change-Id: I6cf842f80eaccafc905d620970afe91e2092d568
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/pid/zone.hpp b/pid/zone.hpp
index 99a8f14..6d5f6cc 100644
--- a/pid/zone.hpp
+++ b/pid/zone.hpp
@@ -2,6 +2,7 @@
 
 #include "conf.hpp"
 #include "controller.hpp"
+#include "pidcontroller.hpp"
 #include "sensors/manager.hpp"
 #include "sensors/sensor.hpp"
 #include "xyz/openbmc_project/Control/Mode/server.hpp"
@@ -76,8 +77,8 @@
     void process_fans(void);
     void process_thermals(void);
 
-    void addFanPID(std::unique_ptr<PIDController> pid);
-    void addThermalPID(std::unique_ptr<PIDController> pid);
+    void addFanPID(std::unique_ptr<Controller> pid);
+    void addThermalPID(std::unique_ptr<Controller> pid);
     double getCachedValue(const std::string& name) override;
     void addFanInput(std::string fan);
     void addThermalInput(std::string therm);
@@ -111,6 +112,6 @@
     std::map<std::string, double> _cachedValuesByName;
     const SensorManager& _mgr;
 
-    std::vector<std::unique_ptr<PIDController>> _fans;
-    std::vector<std::unique_ptr<PIDController>> _thermals;
+    std::vector<std::unique_ptr<Controller>> _fans;
+    std::vector<std::unique_ptr<Controller>> _thermals;
 };