style: rename main globals per style

Rename the main global variables per openbmc style.

Change-Id: I9de8cf841304f24238ae0275b6904f4926a6892d
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/dbus/dbusconfiguration.cpp b/dbus/dbusconfiguration.cpp
index 9a03c0b..067efc7 100644
--- a/dbus/dbusconfiguration.cpp
+++ b/dbus/dbusconfiguration.cpp
@@ -30,9 +30,9 @@
 
 static constexpr bool DEBUG = false; // enable to print found configuration
 
-std::map<std::string, struct SensorConfig> SensorConfig = {};
-std::map<int64_t, PIDConf> ZoneConfig = {};
-std::map<int64_t, struct ZoneConfig> ZoneDetailsConfig = {};
+std::map<std::string, struct SensorConfig> sensorConfig = {};
+std::map<int64_t, PIDConf> zoneConfig = {};
+std::map<int64_t, struct ZoneConfig> zoneDetailsConfig = {};
 
 constexpr const char* pidConfigurationInterface =
     "xyz.openbmc_project.Configuration.Pid";
@@ -75,7 +75,7 @@
     // print sensor config
     std::cout << "sensor config:\n";
     std::cout << "{\n";
-    for (const auto& pair : SensorConfig)
+    for (const auto& pair : sensorConfig)
     {
 
         std::cout << "\t{" << pair.first << ",\n\t\t{";
@@ -89,7 +89,7 @@
     std::cout << "}\n\n";
     std::cout << "ZoneDetailsConfig\n";
     std::cout << "{\n";
-    for (const auto& zone : ZoneDetailsConfig)
+    for (const auto& zone : zoneDetailsConfig)
     {
         std::cout << "\t{" << zone.first << ",\n";
         std::cout << "\t\t{" << zone.second.minthermalrpm << ", ";
@@ -98,7 +98,7 @@
     std::cout << "}\n\n";
     std::cout << "ZoneConfig\n";
     std::cout << "{\n";
-    for (const auto& zone : ZoneConfig)
+    for (const auto& zone : zoneConfig)
     {
         std::cout << "\t{" << zone.first << "\n";
         for (const auto& pidconf : zone.second)
@@ -301,7 +301,7 @@
                 index = zoneIndex.end() - it;
             }
 
-            auto& details = ZoneDetailsConfig[index];
+            auto& details = zoneDetailsConfig[index];
             details.minthermalrpm = variant_ns::apply_visitor(
                 VariantToFloatVisitor(), zone.at("MinThermalRpm"));
             details.failsafepercent = variant_ns::apply_visitor(
@@ -328,7 +328,7 @@
                 {
                     index = zoneIndex.end() - it;
                 }
-                PIDConf& conf = ZoneConfig[index];
+                PIDConf& conf = zoneConfig[index];
 
                 std::vector<std::string> sensorNames =
                     variant_ns::get<std::vector<std::string>>(
@@ -360,7 +360,7 @@
                     if (sensorPathIfacePair.second == sensorInterface)
                     {
                         inputs.push_back(name);
-                        auto& config = SensorConfig[name];
+                        auto& config = sensorConfig[name];
                         config.type =
                             variant_ns::get<std::string>(base.at("Class"));
                         config.readpath = sensorPathIfacePair.first;
@@ -382,7 +382,7 @@
                             }
                             std::replace(otherSensor.begin(), otherSensor.end(),
                                          ' ', '_');
-                            auto& config = SensorConfig[otherSensor];
+                            auto& config = sensorConfig[otherSensor];
                             config.writepath = sensorPathIfacePair.first;
                             // todo: un-hardcode this if there are fans with
                             // different ranges
@@ -456,7 +456,7 @@
                 {
                     index = zoneIndex.end() - it;
                 }
-                PIDConf& conf = ZoneConfig[index];
+                PIDConf& conf = zoneConfig[index];
 
                 std::vector<std::string> inputs;
                 std::vector<std::string> sensorNames =
@@ -478,7 +478,7 @@
                     }
 
                     inputs.push_back(name);
-                    auto& config = SensorConfig[name];
+                    auto& config = sensorConfig[name];
                     config.readpath = sensorPathIfacePair.first;
                     config.type = "temp";
                     // todo: maybe un-hardcode this if we run into slower
@@ -551,7 +551,7 @@
     {
         debugPrint();
     }
-    if (ZoneConfig.empty())
+    if (zoneConfig.empty())
     {
         std::cerr << "No fan zones, application pausing until reboot\n";
         while (1)
diff --git a/main.cpp b/main.cpp
index 6c3209d..6c39899 100644
--- a/main.cpp
+++ b/main.cpp
@@ -46,11 +46,11 @@
 #endif
 
 /* The YAML converted sensor list. */
-extern std::map<std::string, struct SensorConfig> SensorConfig;
+extern std::map<std::string, struct SensorConfig> sensorConfig;
 /* The YAML converted PID list. */
-extern std::map<int64_t, PIDConf> ZoneConfig;
+extern std::map<int64_t, PIDConf> zoneConfig;
 /* The YAML converted Zone configuration. */
-extern std::map<int64_t, struct ZoneConfig> ZoneDetailsConfig;
+extern std::map<int64_t, struct ZoneConfig> zoneDetailsConfig;
 
 int main(int argc, char* argv[])
 {
@@ -117,8 +117,8 @@
     }
     else
     {
-        mgmr = buildSensors(SensorConfig);
-        zones = buildZones(ZoneConfig, ZoneDetailsConfig, mgmr, ModeControlBus);
+        mgmr = buildSensors(sensorConfig);
+        zones = buildZones(zoneConfig, zoneDetailsConfig, mgmr, ModeControlBus);
     }
 
     if (0 == zones.size())
diff --git a/scripts/writepid.mako.cpp b/scripts/writepid.mako.cpp
index f168e10..1718bd1 100644
--- a/scripts/writepid.mako.cpp
+++ b/scripts/writepid.mako.cpp
@@ -6,7 +6,7 @@
 #include <map>
 #include "conf.hpp"
 
-std::map<int64_t, PIDConf> ZoneConfig = {
+std::map<int64_t, PIDConf> zoneConfig = {
 % for zone in PIDDict.iterkeys():
     % if zone:
     {${zone},
diff --git a/scripts/writesensor.mako.cpp b/scripts/writesensor.mako.cpp
index 6f81e82..70cd019 100644
--- a/scripts/writesensor.mako.cpp
+++ b/scripts/writesensor.mako.cpp
@@ -6,7 +6,7 @@
 #include <map>
 #include "conf.hpp"
 
-std::map<std::string, struct SensorConfig> SensorConfig = {
+std::map<std::string, struct SensorConfig> sensorConfig = {
 % for key in sensorDict.iterkeys():
    % if key:
    <%
diff --git a/scripts/writezone.mako.cpp b/scripts/writezone.mako.cpp
index 2598613..5c4f4fa 100644
--- a/scripts/writezone.mako.cpp
+++ b/scripts/writezone.mako.cpp
@@ -6,7 +6,7 @@
 #include <map>
 #include "conf.hpp"
 
-std::map<int64_t, struct ZoneConfig> ZoneDetailsConfig = {
+std::map<int64_t, struct ZoneConfig> zoneDetailsConfig = {
 % for zone in ZoneDict.iterkeys():
    % if zone:
    <%