conf: add ignoreDbusMinMax option

Add an optional field to the sensor configuration, s.t. it'll tell a
dbus passive sensor to ignore the MinValue and MaxValue properties from
dbus.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ia6a8c802c2dc5bf41e5e860b21d7764cc09e6b6b
diff --git a/sensors/buildjson.cpp b/sensors/buildjson.cpp
index 2dc5a37..482173d 100644
--- a/sensors/buildjson.cpp
+++ b/sensors/buildjson.cpp
@@ -42,9 +42,19 @@
         j.at("writePath").get_to(s.writePath);
     }
 
+    /* Default to not ignore dbus MinValue/MaxValue - only used by passive
+     * sensors.
+     */
+    s.ignoreDbusMinMax = false;
     s.min = 0;
     s.max = 0;
 
+    auto ignore = j.find("ignoreDbusMinMax");
+    if (ignore != j.end())
+    {
+        j.at("ignoreDbusMinMax").get_to(s.ignoreDbusMinMax);
+    }
+
     /* The min field is optional in a configuration. */
     auto min = j.find("min");
     if (min != j.end())