summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Feist <james.feist@linux.intel.com>2019-02-04 12:00:39 -0800
committerJames Feist <james.feist@linux.intel.com>2019-02-04 12:46:24 -0800
commitc8bd1d1e929646e163ba468cc1613e1ca2b06d82 (patch)
treec9998bfc9eb04698305501e1572b33c6fa158a72
parent35621ebeb9dd7bc252deba099bf882ff98b7c1fb (diff)
downloadphosphor-pid-control-c8bd1d1e929646e163ba468cc1613e1ca2b06d82.tar.gz
phosphor-pid-control-c8bd1d1e929646e163ba468cc1613e1ca2b06d82.zip
[dbus-configuration] Back out divide by 100
In the entity-manager configuration files having a outlimitmax of 10000 is confusing as this looks like a tach reading, but is actually 100 percent * 100. Back this out when dealing with dbusconfiguration. Change-Id: I13609573fcf1c9da50afd270ea9aad0411b5768b Signed-off-by: James Feist <james.feist@linux.intel.com>
-rw-r--r--pid/fancontroller.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/pid/fancontroller.cpp b/pid/fancontroller.cpp
index 4a61def..ee43e4e 100644
--- a/pid/fancontroller.cpp
+++ b/pid/fancontroller.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include "config.h"
+
#include "fancontroller.hpp"
#include "util.hpp"
@@ -126,8 +128,12 @@ void FanController::outputProc(double value)
}
#endif
+// in the dbus configurations the /100 is added to the configurations
+// directly so this step is not needed
+#if !CONFIGURE_DBUS
// value and kFanFailSafeDutyCycle are 10 for 10% so let's fix that.
percent /= 100;
+#endif
// PidSensorMap for writing.
for (const auto& it : _inputs)
OpenPOWER on IntegriCloud