summaryrefslogtreecommitdiffstats
path: root/conf.d/project
diff options
context:
space:
mode:
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.json2
-rw-r--r--conf.d/project/lua.d/init-daemon-04-oncall.lua7
3 files changed, 15 insertions, 1 deletions
diff --git a/conf.d/project/etc/init-daemon.json b/conf.d/project/etc/init-daemon.json
index 045f3fe..a631859 100644
--- a/conf.d/project/etc/init-daemon.json
+++ b/conf.d/project/etc/init-daemon.json
@@ -20,6 +20,13 @@
"version": "1.0",
"info": "Manage interaction with gps service",
"basename": "gps"
+ },
+ {
+ "label": "lua2c",
+ "version": "1.0",
+ "info": "Lua2C Interface",
+ "basename": "lua2c-interface",
+ "lua2c": ["ssetSignalValue"]
}
]
}
diff --git a/conf.d/project/etc/sig-demoboard.json b/conf.d/project/etc/sig-demoboard.json
index 5eb662c..84269d6 100644
--- a/conf.d/project/etc/sig-demoboard.json
+++ b/conf.d/project/etc/sig-demoboard.json
@@ -2,7 +2,7 @@
"signals": [
{
"id": "vehicle_speed",
- "event": "low-can/messages.vehicle.speed",
+ "event": "low-can/messages.vehicle.average.speed",
"class": "temporal",
"unit": "km/h",
"frequency": 1,
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")