aboutsummaryrefslogtreecommitdiffstats
path: root/conf.d/project/lua.d/init-daemon-04-oncall.lua
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-21 18:16:21 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commitb9dd9b46d25f106694528722d63fdc1611d31afd (patch)
tree748d356c9d2e9700b846248a87099701d1008f28 /conf.d/project/lua.d/init-daemon-04-oncall.lua
parentc27b88e3c36585d11e866902f73d1e961357c45c (diff)
Make compile LUA2C functions, binding not working
Change-Id: I37e66929e3ebf464802f9b89a222743936862029 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'conf.d/project/lua.d/init-daemon-04-oncall.lua')
-rw-r--r--conf.d/project/lua.d/init-daemon-04-oncall.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/conf.d/project/lua.d/init-daemon-04-oncall.lua b/conf.d/project/lua.d/init-daemon-04-oncall.lua
index ae16aa7..d473121 100644
--- a/conf.d/project/lua.d/init-daemon-04-oncall.lua
+++ b/conf.d/project/lua.d/init-daemon-04-oncall.lua
@@ -28,6 +28,7 @@ _interval={
{"m/s",0.27777777777778},
}
+_result = {}
_positions={}
for i=1,3 do
_positions[_interval[i][1]]=i
@@ -51,6 +52,9 @@ function _Unit_Converter(source, args, event)
end
print("Value in", targetunits, "is", value/base)
+ _result["result"] = value/base
+
+ ssetSignalValue(source, _result)
elseif sourcei>targeti then
@@ -60,6 +64,9 @@ function _Unit_Converter(source, args, event)
end
print("Value in ", targetunits, "is", value*base)
+ _result["result"] = value/base
+
+ ssetSignalValue(source, _result)
else
print("No conversion")