test: pid: fancontroller
Adds unit-tests for the fancontroller.
Bugfix: set point not initialized to 0, although bug has no impact.
Tested: Ran on quanta-q71l board and it behaved as expected.
Change-Id: I516833d8c9ed806b765ff9333801f3d57932a17b
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/pid/fancontroller.hpp b/pid/fancontroller.hpp
index b9b015c..3354bb6 100644
--- a/pid/fancontroller.hpp
+++ b/pid/fancontroller.hpp
@@ -35,6 +35,11 @@
float setpt_proc(void) override;
void output_proc(float value) override;
+ FanSpeedDirection getFanDirection(void) const
+ {
+ return _direction;
+ }
+
void setFanDirection(FanSpeedDirection direction)
{
_direction = direction;