Adding new feature of core PID loop logging
This differs from the normal logging,
as this focuses on the core of the PID loop computations.
All variables within the core pid/ec/pid.cpp pid()
function are now logged, so math can be debugged.
Output is throttled to only log a new line
when it changes, or when 60 seconds have elapsed.
Creates 2 files for each PID loop,
one showing coefficients that were configured for it,
and one showing the variables changing over time.
Enable by --corelogging command line option,
or by creating /etc/thermal.d/corelogging file.
Tested:
Log files appear as expected, when enabled.
No changes noticed, when this feature is disabled.
Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: I3f37fe918e7cbc6fb885ffa2f268600d5a317d32
diff --git a/test/pid_fancontroller_unittest.cpp b/test/pid_fancontroller_unittest.cpp
index f330202..8379113 100644
--- a/test/pid_fancontroller_unittest.cpp
+++ b/test/pid_fancontroller_unittest.cpp
@@ -1,3 +1,4 @@
+#include "pid/ec/logging.hpp"
#include "pid/ec/pid.hpp"
#include "pid/fancontroller.hpp"
#include "test/sensor_mock.hpp"