conf change: rename zone variables

Rename the zone variables to make them camelCase as a step towards
making all configuration variables camelCase for consistency.

Note: This patchset requires a change to your yaml configuration if
you're using it, or libconfig if you're using it.

Change-Id: If9cf1d7eb8227d305a1625275f2f7082c0d6905a
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/conf.hpp b/conf.hpp
index c251efc..c5734cc 100644
--- a/conf.hpp
+++ b/conf.hpp
@@ -46,10 +46,10 @@
 struct ZoneConfig
 {
     /* The minimum RPM value we would ever want. */
-    double minthermalrpm;
+    double minThermalRpm;
 
     /* If the sensors are in fail-safe mode, this is the percentage to use. */
-    double failsafepercent;
+    double failsafePercent;
 };
 
 using PIDConf = std::map<std::string, struct ControllerInfo>;
diff --git a/dbus/dbusconfiguration.cpp b/dbus/dbusconfiguration.cpp
index 4cdeb44..0045822 100644
--- a/dbus/dbusconfiguration.cpp
+++ b/dbus/dbusconfiguration.cpp
@@ -92,8 +92,8 @@
     for (const auto& zone : zoneDetailsConfig)
     {
         std::cout << "\t{" << zone.first << ",\n";
-        std::cout << "\t\t{" << zone.second.minthermalrpm << ", ";
-        std::cout << zone.second.failsafepercent << "}\n\t},\n";
+        std::cout << "\t\t{" << zone.second.minThermalRpm << ", ";
+        std::cout << zone.second.failsafePercent << "}\n\t},\n";
     }
     std::cout << "}\n\n";
     std::cout << "ZoneConfig\n";
@@ -294,9 +294,9 @@
             size_t index = getZoneIndex(name, foundZones);
 
             auto& details = zoneDetailsConfig[index];
-            details.minthermalrpm =
+            details.minThermalRpm =
                 std::visit(VariantToDoubleVisitor(), zone.at("MinThermalRpm"));
-            details.failsafepercent = std::visit(VariantToDoubleVisitor(),
+            details.failsafePercent = std::visit(VariantToDoubleVisitor(),
                                                  zone.at("FailSafePercent"));
         }
         auto findBase = configuration.second.find(pidConfigurationInterface);
diff --git a/examples/swampd.conf b/examples/swampd.conf
index c17a75c..c4fab5e 100644
--- a/examples/swampd.conf
+++ b/examples/swampd.conf
@@ -58,7 +58,7 @@
 
 zones = (
   { id = 0x01
-    minthermalrpm = 3000.0
+    minThermalRpm = 3000.0
     failsafepwm = 90.0
     pids = (
       { name = "allfans"
diff --git a/pid/builder.cpp b/pid/builder.cpp
index 8fef528..2a64215 100644
--- a/pid/builder.cpp
+++ b/pid/builder.cpp
@@ -63,8 +63,8 @@
         const PIDConf& pidConfig = zi.second;
 
         auto zone = std::make_unique<PIDZone>(
-            zoneId, zoneConf->second.minthermalrpm,
-            zoneConf->second.failsafepercent, mgr, modeControlBus,
+            zoneId, zoneConf->second.minThermalRpm,
+            zoneConf->second.failsafePercent, mgr, modeControlBus,
             getControlPath(zi.first).c_str(), deferSignals);
 
         std::cerr << "Zone Id: " << zone->getZoneID() << "\n";
diff --git a/pid/builderconfig.cpp b/pid/builderconfig.cpp
index f85e1c1..652724d 100644
--- a/pid/builderconfig.cpp
+++ b/pid/builderconfig.cpp
@@ -76,9 +76,9 @@
 
             zoneSettings.lookupValue("id", id);
 
-            thisZoneConfig.minthermalrpm = zoneSettings.lookup("minthermalrpm");
-            thisZoneConfig.failsafepercent =
-                zoneSettings.lookup("failsafepercent");
+            thisZoneConfig.minThermalRpm = zoneSettings.lookup("minThermalRpm");
+            thisZoneConfig.failsafePercent =
+                zoneSettings.lookup("failsafePercent");
 
             const Setting& pids = zoneSettings["pids"];
             int pidCount = pids.getLength();
diff --git a/scripts/writezone.mako.cpp b/scripts/writezone.mako.cpp
index 5c4f4fa..f466060 100644
--- a/scripts/writezone.mako.cpp
+++ b/scripts/writezone.mako.cpp
@@ -11,8 +11,8 @@
    % if zone:
    <%
            zConf = ZoneDict[zone]
-           min = zConf["minthermalrpm"]
-           percent = zConf["failsafepercent"]
+           min = zConf["minThermalRpm"]
+           percent = zConf["failsafePercent"]
    %>
     {${zone},
         {${min}, ${percent}},
diff --git a/scripts/zone-example.txt b/scripts/zone-example.txt
index 88adc26..3f987a2 100644
--- a/scripts/zone-example.txt
+++ b/scripts/zone-example.txt
@@ -1,4 +1,4 @@
 0x01: /* The zone ID */
-  minthermalrpm: 3000.0 /* The minimum thermal RPM value. (double) */
+  minThermalRpm: 3000.0 /* The minimum thermal RPM value. (double) */
   /* The percent to use when the zone is in fail-safe mode. (double) */
-  failsafepercent: 90.0
+  failsafePercent: 90.0
diff --git a/scripts/zone-example.yaml b/scripts/zone-example.yaml
index ef422a5..8fecf71 100644
--- a/scripts/zone-example.yaml
+++ b/scripts/zone-example.yaml
@@ -1,3 +1,3 @@
 0x01:
-  minthermalrpm: 3000.0
-  failsafepercent: 90.0
+  minThermalRpm: 3000.0
+  failsafePercent: 90.0