Support to accumulate PWM of different controllers for same sensor

Description:
1. Add one property: accumulateSetPoint in zone of fan table that could
   be used to enable accumulation of output PWM of different controllers
   with same sensor.

2. Add one property: checkHysterWithSetpt in pid info of fan table to
   select to compare current input and setpoint to check hysteresis.

3. The purpose of accumulate the stepwise output and PID output for
   one sensor is that the setting of stepwise could use to prevent
   the fan speed from suddenly increasing from a very low speed to a
   very high speed due to reaching the setpoint.

   Use stepwise before setpoint could also keep the PWM steady at
   low ambient temperature.

Design:
1. Search "accumulateSetPoint" field in fan table.
   If the value was true, accumulate the output PWM of different
   controllers with same profile name.

2. Support two method to calculate PID output that could be chosen by
   setting the "checkHysterWithSetpt" to true in pid info of fan table.

   If the flag was set to true, it won't calculate PWM output if the
   input lower than setpoint.

Test Case:
1. Check the output PWM of different controllers with same profile
   name could be accumulated - pass.

2. Set "checkHysterWithSetpt" to true and check PID output would not be
   calculated if the input temperature was lower than setpoint - pass.

Please see more details in gist:
https://gist.github.com/DelphineCCChiu/a6170d3e1a12fc4ee76fad324382fba3

Change-Id: I9f38f250d72545784c6c11be2fde7d45f0b385c4
Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
diff --git a/dbus/dbusconfiguration.cpp b/dbus/dbusconfiguration.cpp
index 7b78280..f9c3460 100644
--- a/dbus/dbusconfiguration.cpp
+++ b/dbus/dbusconfiguration.cpp
@@ -385,14 +385,20 @@
     info.pidInfo.slewPos = std::visit(VariantToDoubleVisitor(),
                                       getPIDAttribute(base, "SlewPos"));
 
+    bool checkHysterWithSetpt = false;
     double negativeHysteresis = 0;
     double positiveHysteresis = 0;
     double derivativeCoeff = 0;
 
+    auto findCheckHysterFlag = base.find("CheckHysterWithSetpt");
     auto findNeg = base.find("NegativeHysteresis");
     auto findPos = base.find("PositiveHysteresis");
     auto findDerivative = base.find("DCoefficient");
 
+    if (findCheckHysterFlag != base.end())
+    {
+        checkHysterWithSetpt = std::get<bool>(findCheckHysterFlag->second);
+    }
     if (findNeg != base.end())
     {
         negativeHysteresis = std::visit(VariantToDoubleVisitor(),
@@ -409,6 +415,7 @@
                                      findDerivative->second);
     }
 
+    info.pidInfo.checkHysterWithSetpt = checkHysterWithSetpt;
     info.pidInfo.negativeHysteresis = negativeHysteresis;
     info.pidInfo.positiveHysteresis = positiveHysteresis;
     info.pidInfo.derivativeCoeff = derivativeCoeff;
@@ -649,6 +656,14 @@
                                 details.cycleTime.cycleIntervalTimeMS);
             getCycleTimeSetting(zone, index, "UpdateThermalsTimeMS",
                                 details.cycleTime.updateThermalsTimeMS);
+
+            bool accumulateSetPoint = false;
+            auto findAccSetPoint = zone.find("AccumulateSetPoint");
+            if (findAccSetPoint != zone.end())
+            {
+                accumulateSetPoint = std::get<bool>(findAccSetPoint->second);
+            }
+            details.accumulateSetPoint = accumulateSetPoint;
         }
         auto findBase = configuration.second.find(pidConfigurationInterface);
         // loop through all the PID configurations and fill out a sensor config