aboutsummaryrefslogtreecommitdiffstats
path: root/conf.d/project
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-10-05 01:38:18 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commit8df3e437f941912067231250ff5695b8a3a7fd92 (patch)
treec812fb252ad0f8a48041aff28b7fc60a75f245d1 /conf.d/project
parent8364673ab93eb484e25c7c4776e5d705b73330b4 (diff)
LUA lib and bin embedded in project
Change-Id: I1a61b49f55e4daa305800e754a14b6041aa81b34 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'conf.d/project')
-rw-r--r--conf.d/project/etc/init-daemon.json7
-rw-r--r--conf.d/project/etc/sig-demoboard.json5
-rw-r--r--conf.d/project/lua.d/init-daemon-04-oncall.lua6
3 files changed, 8 insertions, 10 deletions
diff --git a/conf.d/project/etc/init-daemon.json b/conf.d/project/etc/init-daemon.json
index 635b697..045f3fe 100644
--- a/conf.d/project/etc/init-daemon.json
+++ b/conf.d/project/etc/init-daemon.json
@@ -20,13 +20,6 @@
"version": "1.0",
"info": "Manage interaction with gps service",
"basename": "gps"
- },
- {
- "label": "lua2c",
- "version": "1.0",
- "info": "Lua2C Interface",
- "basename": "lua2c-interface",
- "lua2c": ["setSignalValueWrap"]
}
]
}
diff --git a/conf.d/project/etc/sig-demoboard.json b/conf.d/project/etc/sig-demoboard.json
index 3b82bfe..1bccbff 100644
--- a/conf.d/project/etc/sig-demoboard.json
+++ b/conf.d/project/etc/sig-demoboard.json
@@ -23,7 +23,10 @@
"event": "low-can/diagnostic_messages.engine.speed",
"retention": 30,
"unit": "rpm",
- "frequency": 1
+ "frequency": 1,
+ "onReceived": {
+ "function": "builtin://defaultOnReceived"
+ }
},
{
"id": "fuel_level",
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 7dc4669..71df908 100644
--- a/conf.d/project/lua.d/init-daemon-04-oncall.lua
+++ b/conf.d/project/lua.d/init-daemon-04-oncall.lua
@@ -42,6 +42,8 @@ function _Unit_Converter(source, args, event)
local sourcei, targeti = _positions[sourceunits], _positions[targetunits]
assert(sourcei and targeti)
+ print(event['timestamp'])
+
if sourcei<targeti then
local base=1
@@ -51,7 +53,7 @@ function _Unit_Converter(source, args, event)
event["value"] = value/base
- lua2c["setSignalValueWrap"](source, event)
+ lua2c["luaSet"](source, event)
elseif sourcei>targeti then
@@ -62,7 +64,7 @@ function _Unit_Converter(source, args, event)
event["value"] = value/base
- lua2c["setSignalValueWrap"](source, event)
+ lua2c["luaSet"](source, event)
else
print("No conversion")