summaryrefslogtreecommitdiffstats
path: root/scripts/writesensor.mako.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/writesensor.mako.cpp')
-rw-r--r--scripts/writesensor.mako.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/writesensor.mako.cpp b/scripts/writesensor.mako.cpp
index fbfe6a9..cb3be09 100644
--- a/scripts/writesensor.mako.cpp
+++ b/scripts/writesensor.mako.cpp
@@ -16,8 +16,12 @@ extern const IdInfoMap sensors = {
path = sensor["path"]
sensorType = sensor["sensorType"]
readingType = sensor["sensorReadingType"]
+ multiplier = sensor.get("multiplierM", 1)
+ offset = sensor.get("offsetB", 0)
+ exp = sensor.get("bExp", 0)
%>
- ${sensorType},"${path}",${readingType},{
+ ${sensorType},"${path}",${readingType},${multiplier},${offset},${exp},
+ ${offset * pow(10,exp)},{
% for interface,properties in interfaces.iteritems():
{"${interface}",{
% for dbus_property,property_value in properties.iteritems():
OpenPOWER on IntegriCloud