summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorTom Joseph <tomjoseph@in.ibm.com>2017-09-07 15:28:32 +0530
committerTom Joseph <tomjoseph@in.ibm.com>2017-09-14 19:24:34 +0530
commitb673ff6af479ee90057e948c94f506f4186f064e (patch)
tree0f9b9291ed012b51c846d6cca914e0048355b615 /scripts
parent7a845f00a1bab1257d7187c02f8c3a57aeb64850 (diff)
downloadphosphor-host-ipmid-b673ff6af479ee90057e948c94f506f4186f064e.tar.gz
phosphor-host-ipmid-b673ff6af479ee90057e948c94f506f4186f064e.zip
sensor: Correct the offset field in reading calculation
Change-Id: If85dd3d6705ccc86a8e3406ef5f90fcc6e2967d1 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/writesensor.mako.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/writesensor.mako.cpp b/scripts/writesensor.mako.cpp
index b2da7ca..f420490 100644
--- a/scripts/writesensor.mako.cpp
+++ b/scripts/writesensor.mako.cpp
@@ -99,7 +99,7 @@ extern const IdInfoMap sensors = {
sensorType = sensor["sensorType"]
readingType = sensor["sensorReadingType"]
multiplier = sensor.get("multiplierM", 1)
- offset = sensor.get("offsetB", 0)
+ offsetB = sensor.get("offsetB", 0)
exp = sensor.get("bExp", 0)
valueReadingType = sensor["readingType"]
updateFunc = interfaceDict[serviceInterface]["updateFunc"]
@@ -118,7 +118,7 @@ extern const IdInfoMap sensors = {
mutability = sensor.get("mutability", "Mutability::Read")
%>
${sensorType},"${path}","${sensorInterface}",${readingType},${multiplier},
- ${offset},${exp},${offset * pow(10,exp)},${updateFunc},${getFunc},Mutability(${mutability}),{
+ ${offsetB},${exp},${offsetB * pow(10,exp)},${updateFunc},${getFunc},Mutability(${mutability}),{
% for interface,properties in interfaces.items():
{"${interface}",{
% for dbus_property,property_value in properties.items():
OpenPOWER on IntegriCloud