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.cpp b/pid/zone.cpp
index 9e948f0..92a332e 100644
--- a/pid/zone.cpp
+++ b/pid/zone.cpp
@@ -21,6 +21,7 @@
 #include "pid/controller.hpp"
 #include "pid/ec/pid.hpp"
 #include "pid/fancontroller.hpp"
+#include "pid/stepwisecontroller.hpp"
 #include "pid/thermalcontroller.hpp"
 
 #include <algorithm>
@@ -80,12 +81,12 @@
     return _minThermalRpmSetPt;
 }
 
-void PIDZone::addFanPID(std::unique_ptr<PIDController> pid)
+void PIDZone::addFanPID(std::unique_ptr<Controller> pid)
 {
     _fans.push_back(std::move(pid));
 }
 
-void PIDZone::addThermalPID(std::unique_ptr<PIDController> pid)
+void PIDZone::addThermalPID(std::unique_ptr<Controller> pid)
 {
     _thermals.push_back(std::move(pid));
 }
@@ -305,7 +306,7 @@
 {
     for (auto& p : _fans)
     {
-        p->pid_process();
+        p->process();
     }
 }
 
@@ -313,7 +314,7 @@
 {
     for (auto& p : _thermals)
     {
-        p->pid_process();
+        p->process();
     }
 }