summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/writesensor.mako.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/writesensor.mako.cpp b/scripts/writesensor.mako.cpp
index 0b8d5f1..fbfe6a9 100644
--- a/scripts/writesensor.mako.cpp
+++ b/scripts/writesensor.mako.cpp
@@ -24,17 +24,16 @@ extern const IdInfoMap sensors = {
{"${dbus_property}",{
% for offset,values in property_value.iteritems():
{ ${offset},{
-<%
- valueType = values["type"]
-%>
+ <% valueType = values["type"] %>\
% for name,value in values.iteritems():
% if name == "type":
-<%
- continue
-%>
+ <% continue %>\
% endif
% if valueType == "string":
std::string("${value}"),
+ % elif valueType == "bool":
+ <% value = str(value).lower() %>\
+ ${value},
% else:
${value},
% endif
OpenPOWER on IntegriCloud