summaryrefslogtreecommitdiffstats
path: root/monitor/gen-fan-monitor-defs.py
diff options
context:
space:
mode:
Diffstat (limited to 'monitor/gen-fan-monitor-defs.py')
-rwxr-xr-xmonitor/gen-fan-monitor-defs.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/monitor/gen-fan-monitor-defs.py b/monitor/gen-fan-monitor-defs.py
index 1590484..48cf7ec 100755
--- a/monitor/gen-fan-monitor-defs.py
+++ b/monitor/gen-fan-monitor-defs.py
@@ -36,8 +36,13 @@ const std::vector<FanDefinition> fanDefinitions
<%
#has_target is a bool, and we need a true instead of True
has_target = str(sensor['has_target']).lower()
+ factor = sensor.get('factor', 1)
+ offset = sensor.get('offset', 0)
%> \
- SensorDefinition{"${sensor['name']}", ${has_target}},
+ SensorDefinition{"${sensor['name']}",
+ ${has_target},
+ ${factor},
+ ${offset}},
%endfor
},
},
OpenPOWER on IntegriCloud