diff options
Diffstat (limited to 'conf.d/project')
-rw-r--r-- | conf.d/project/etc/init-daemon.json | 7 | ||||
-rw-r--r-- | conf.d/project/etc/sig-demoboard.json | 5 | ||||
-rw-r--r-- | conf.d/project/lua.d/init-daemon-04-oncall.lua | 6 |
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") |