rename away from RPM

The SetPoint output from a thermal PID is likely RPM, and that value is
then fed into a fan controller PID as the set-point (unit: RPM).  This
does not have to be RPM, however.  Continue renaming variables and
methods to remove the explicit unit-naming.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I570dee0c688338f9a458cac7123314717bee2b42
diff --git a/pid/fancontroller.cpp b/pid/fancontroller.cpp
index 1f23e0b..dd26d16 100644
--- a/pid/fancontroller.cpp
+++ b/pid/fancontroller.cpp
@@ -88,7 +88,7 @@
 
 double FanController::setptProc(void)
 {
-    double maxRPM = _owner->getMaxRPMRequest();
+    double maxRPM = _owner->getMaxSetPointRequest();
 
     // store for reference, and check if more or less.
     double prev = getSetpoint();
diff --git a/pid/pidloop.cpp b/pid/pidloop.cpp
index b86ea4b..56bf8bd 100644
--- a/pid/pidloop.cpp
+++ b/pid/pidloop.cpp
@@ -37,7 +37,7 @@
     // Run the margin PIDs.
     zone->processThermals();
     // Get the maximum RPM setpoint.
-    zone->determineMaxRPMRequest();
+    zone->determineMaxSetPointRequest();
 }
 
 void pidControlLoop(PIDZone* zone, boost::asio::steady_timer& timer, bool first,
diff --git a/pid/zone.cpp b/pid/zone.cpp
index 47d6695..6a63671 100644
--- a/pid/zone.cpp
+++ b/pid/zone.cpp
@@ -35,9 +35,9 @@
 using tstamp = std::chrono::high_resolution_clock::time_point;
 using namespace std::literals::chrono_literals;
 
-double PIDZone::getMaxRPMRequest(void) const
+double PIDZone::getMaxSetPointRequest(void) const
 {
-    return _maximumRPMSetPt;
+    return _maximumSetPoint;
 }
 
 bool PIDZone::getManualMode(void) const
@@ -86,7 +86,7 @@
     return _failSafePercent;
 }
 
-double PIDZone::getMinThermalRPMSetpoint(void) const
+double PIDZone::getMinThermalSetpoint(void) const
 {
     return _minThermalOutputSetPt;
 }
@@ -116,7 +116,7 @@
     _thermalInputs.push_back(therm);
 }
 
-void PIDZone::determineMaxRPMRequest(void)
+void PIDZone::determineMaxSetPointRequest(void)
 {
     double max = 0;
     std::vector<double>::iterator result;
@@ -137,7 +137,7 @@
      * If the maximum RPM setpoint output is below the minimum RPM
      * setpoint, set it to the minimum.
      */
-    max = std::max(getMinThermalRPMSetpoint(), max);
+    max = std::max(getMinThermalSetpoint(), max);
 
     if (tuningEnabled)
     {
@@ -167,7 +167,7 @@
         }
     }
 
-    _maximumRPMSetPt = max;
+    _maximumSetPoint = max;
     return;
 }
 
@@ -223,7 +223,7 @@
         _log << std::chrono::duration_cast<std::chrono::milliseconds>(
                     now.time_since_epoch())
                     .count();
-        _log << "," << _maximumRPMSetPt;
+        _log << "," << _maximumSetPoint;
     }
 
     for (const auto& f : _fanInputs)
diff --git a/pid/zone.hpp b/pid/zone.hpp
index 5516bed..3cf4e59 100644
--- a/pid/zone.hpp
+++ b/pid/zone.hpp
@@ -30,7 +30,7 @@
     virtual double getCachedValue(const std::string& name) = 0;
     virtual void addSetPoint(double setpoint) = 0;
     virtual void addRPMCeiling(double ceiling) = 0;
-    virtual double getMaxRPMRequest() const = 0;
+    virtual double getMaxSetPointRequest() const = 0;
     virtual bool getFailSafeMode() const = 0;
     virtual double getFailSafePercent() const = 0;
     virtual Sensor* getSensor(const std::string& name) = 0;
@@ -48,7 +48,7 @@
             const SensorManager& mgr, sdbusplus::bus::bus& bus,
             const char* objPath, bool defer) :
         ModeObject(bus, objPath, defer),
-        _zoneId(zone), _maximumRPMSetPt(),
+        _zoneId(zone), _maximumSetPoint(),
         _minThermalOutputSetPt(minThermalOutput),
         _failSafePercent(failSafePercent), _mgr(mgr)
     {
@@ -58,7 +58,7 @@
         }
     }
 
-    double getMaxRPMRequest(void) const override;
+    double getMaxSetPointRequest(void) const override;
     bool getManualMode(void) const;
 
     /* Could put lock around this since it's accessed from two threads, but
@@ -72,10 +72,10 @@
     void clearSetPoints(void);
     void clearRPMCeilings(void);
     double getFailSafePercent(void) const override;
-    double getMinThermalRPMSetpoint(void) const;
+    double getMinThermalSetpoint(void) const;
 
     Sensor* getSensor(const std::string& name) override;
-    void determineMaxRPMRequest(void);
+    void determineMaxSetPointRequest(void);
     void updateFanTelemetry(void);
     void updateSensors(void);
     void initializeCache(void);
@@ -101,7 +101,7 @@
     std::ofstream _log;
 
     const int64_t _zoneId;
-    double _maximumRPMSetPt = 0;
+    double _maximumSetPoint = 0;
     bool _manualMode = false;
     const double _minThermalOutputSetPt;
     const double _failSafePercent;