FanController: Use raw RPM as input to fan PID loop

The fan PID loop was wrongly using normalized RPM as input, instead of
raw RPM. This meant that the input RPM was between 0.0 and 1.0, the
wrong units, an unusable low value for RPM.

What's more, the inputProc() function used int64_t instead of double,
for an unknown reason, as the input and output of this function is
double. This integer truncation caused the normalized RPM to always be
zero, making this bug harder to notice.

Cleaned up the inputProc() function to always use double, and
correctly use the raw RPM.

I am really glad I had earlier added a feature to maintain the raw
unscaled value, along with the normalized scaled value, in the cache!
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-pid-control/+/36697

This made it easy to recover the raw value. Otherwise, this bug would
have been much harder to fix.

Tested: The RPM input values now use same units as the setpoint,
restoring proper fan PID loop operation, as logged in the new PID core
debugging feature here:
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-pid-control/+/38087

Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: I4607d9ebee57cea04b8f83d658913e24200a6428
diff --git a/pid/zone.cpp b/pid/zone.cpp
index 69464e1..e9aaafc 100644
--- a/pid/zone.cpp
+++ b/pid/zone.cpp
@@ -493,12 +493,10 @@
 
 void DbusPidZone::initializeCache(void)
 {
-    auto nan = std::numeric_limits<double>::quiet_NaN();
-
     for (const auto& f : _fanInputs)
     {
-        _cachedValuesByName[f] = {nan, nan};
-        _cachedFanOutputs[f] = {nan, nan};
+        _cachedValuesByName[f] = {0, 0};
+        _cachedFanOutputs[f] = {0, 0};
 
         // Start all fans in fail-safe mode.
         _failSafeSensors.insert(f);
@@ -506,7 +504,7 @@
 
     for (const auto& t : _thermalInputs)
     {
-        _cachedValuesByName[t] = {nan, nan};
+        _cachedValuesByName[t] = {0, 0};
 
         // Start all sensors in fail-safe mode.
         _failSafeSensors.insert(t);