summaryrefslogtreecommitdiffstats
path: root/dbus
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2019-09-10 09:18:28 -0700
committerPatrick Venture <venture@google.com>2019-09-10 10:47:17 -0700
commit6b9f59991b7f694866c98775b4179ae97c5e69a8 (patch)
tree28eb1e4b0c84b6402ea4ab9904482522049b5c85 /dbus
parent86a1820b6d0e8521a155102b61bfd7a7983d6538 (diff)
downloadphosphor-pid-control-6b9f59991b7f694866c98775b4179ae97c5e69a8.tar.gz
phosphor-pid-control-6b9f59991b7f694866c98775b4179ae97c5e69a8.zip
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
Diffstat (limited to 'dbus')
-rw-r--r--dbus/dbuspassive.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/dbus/dbuspassive.cpp b/dbus/dbuspassive.cpp
index c199563..806ef40 100644
--- a/dbus/dbuspassive.cpp
+++ b/dbus/dbuspassive.cpp
@@ -61,6 +61,13 @@ std::unique_ptr<ReadInterface> DbusPassive::createDbusPassive(
return nullptr;
}
+ /* if these values are zero, they're ignored. */
+ if (info->ignoreDbusMinMax)
+ {
+ settings.min = 0;
+ settings.max = 0;
+ }
+
return std::make_unique<DbusPassive>(bus, type, id, helper, settings,
failed, path, redundancy);
}
OpenPOWER on IntegriCloud