summaryrefslogtreecommitdiffstats
path: root/conf.d/project
diff options
context:
space:
mode:
Diffstat (limited to 'conf.d/project')
-rw-r--r--conf.d/project/config.d/onload-audio-control.json28
-rw-r--r--conf.d/project/lua.d/onload-audio-controls.lua23
2 files changed, 39 insertions, 12 deletions
diff --git a/conf.d/project/config.d/onload-audio-control.json b/conf.d/project/config.d/onload-audio-control.json
index c8f9be2..1a45f99 100644
--- a/conf.d/project/config.d/onload-audio-control.json
+++ b/conf.d/project/config.d/onload-audio-control.json
@@ -36,13 +36,27 @@
[
{
"label": "multimedia",
- "actions": [{
+ "actions": {
"label": "multimedia-control-lua",
"info": "Call Lua Script function Test_Lua_Engin",
- "lua": "Audio_Set_Multimedia",
- }]
+ "lua": "Audio_Set_Multimedia"
+ }
}, {
"label": "navigation",
+ "actions": {
+ "label": "navigation-control-lua",
+ "info": "Call Lua Script to set Navigation",
+ "lua": "Audio_Set_Navigation"
+ }
+ }, {
+ "label": "emergency",
+ "actions": {
+ "label": "emergency-control-ucm",
+ "lua": "Audio_Set_Emergency"
+ }
+ }, {
+ "label": "multi-step-sample",
+ "info" : "all actions must succeed for control to be accepted",
"actions": [{
"label": "multimedia-control-cb",
"info": "Call Sharelib Sample Callback",
@@ -61,13 +75,7 @@
}, {
"label": "navigation-control-lua",
"info": "Call Lua Script to set Navigation",
- "lua": "Audio_Set_Navigation",
- }]
- }, {
- "label": "emergency",
- "actions": [{
- "label": "emergency-control-ucm",
- "lua": "Audio_Set_Emergency",
+ "lua": "Audio_Set_Navigation"
}]
}
],
diff --git a/conf.d/project/lua.d/onload-audio-controls.lua b/conf.d/project/lua.d/onload-audio-controls.lua
index 2fbf4f5..b6fd811 100644
--- a/conf.d/project/lua.d/onload-audio-controls.lua
+++ b/conf.d/project/lua.d/onload-audio-controls.lua
@@ -22,13 +22,32 @@ function Audio_Init_CB (status, result, context)
print ("--inlua:Audio_Init_CB-- result=", Dump_Table(result))
print ("--inlua:Audio_Init_CB-- context=", Dump_Table(context))
- -- (Fulup Bug) AFB:debug ("Audio_Init_Hal result=%s context=%s", result, context)
- AFB:debug ("Audio_Init_Hal result=%s context=%s", {["ret1"]=5678, ["ret2"]="abcd"}, context)
+
+ -- AFB:notice ("Audio_Init_Hal result='%s' context='%s'", result, context)
+ -- AFB:debug ("Audio_Init_Hal result=%s context=%s", {["ret1"]=5678, ["ret2"]="abcd"}, context)
end
-- Function call at binding load time
function Audio_Init_Hal(args, query)
+
+ local nextT = {
+ ["next1"]=1234,
+ ["next2"]="nested",
+ ["next3"]=9999,
+ }
+
+ local response = {
+ ["arg1"]=1234,
+ ["arg2"]=nextT,
+ ["arg3"]=5678,
+ }
+
+ print ("--inlua:Audio_Init-- response=", Dump_Table(response))
+
+ AFB:notice ("**** in-lua table='%s' ****", response)
+
+
AFB:notice ("--LUA:Audio_Init_Hal args=%s query=%s", args, query);
-- query asynchronously loaded HAL