summaryrefslogtreecommitdiffstats
path: root/conf.d/controller/lua.d/mapi_low-can.lua
diff options
context:
space:
mode:
Diffstat (limited to 'conf.d/controller/lua.d/mapi_low-can.lua')
-rw-r--r--conf.d/controller/lua.d/mapi_low-can.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/conf.d/controller/lua.d/mapi_low-can.lua b/conf.d/controller/lua.d/mapi_low-can.lua
index f7cd99a..9909492 100644
--- a/conf.d/controller/lua.d/mapi_low-can.lua
+++ b/conf.d/controller/lua.d/mapi_low-can.lua
@@ -27,6 +27,14 @@ function _unsubscribe(source, args)
end
function _get(source, args)
+ local evtHandle1 = AFB:evtmake(source, 'messages_engine_speed')
+ local evtHandle2 = AFB:evtmake(source, 'messages_vehicle_speed')
+ if type(evtHandle1) == "userdata" and type(evtHandle2) == "userdata" then
+ AFB:subscribe(source, evtHandle1)
+ AFB:evtpush(source,evtHandle1,{value = 1234})
+ AFB:subscribe(source, evtHandle2)
+ AFB:evtpush(source,evtHandle2,{value = 5678})
+ end
AFB:success(source)
end