Fix the exponent B in writesensors mako template
expB has been mistyped as exp() function,
resulting in a build error upon providing
bExp as signed integer in config.yaml
Change-Id: Ibc7ed45e445c4f37b7a6ccdf10346177a3317b0b
Signed-off-by: Kirill Pakhomov <k.pakhomov@yadro.com>
diff --git a/scripts/writesensor.mako.cpp b/scripts/writesensor.mako.cpp
index a59e149..bbc80e3 100644
--- a/scripts/writesensor.mako.cpp
+++ b/scripts/writesensor.mako.cpp
@@ -44,7 +44,7 @@
readingType = sensor["sensorReadingType"]
multiplier = sensor.get("multiplierM", 1)
offsetB = sensor.get("offsetB", 0)
- exp = sensor.get("bExp", 0)
+ bExp = sensor.get("bExp", 0)
rExp = sensor.get("rExp", 0)
unit = sensor.get("unit", "")
scale = sensor.get("scale", 0)
@@ -69,8 +69,8 @@
mutability = sensor.get("mutability", "Mutability::Read")
%>
${entityID},${instance},${sensorType},"${path}","${sensorInterface}",
- ${readingType},${multiplier},${offsetB},${exp},
- ${offsetB * pow(10,exp)}, ${rExp}, ${hasScale},${scale},"${unit}",
+ ${readingType},${multiplier},${offsetB},${bExp},
+ ${offsetB * pow(10,bExp)}, ${rExp}, ${hasScale},${scale},"${unit}",
${updateFunc},${getFunc},Mutability(${mutability}),${sensorNameFunc},{
% for interface,properties in interfaces.items():
{"${interface}",{