scan messages against sequence ##S:soundfile and/or ##N:number and
play sound(s) accordingly, but don't display the message
Successfully tested on OpenTX Companion and (precompiled) on real X9E(02/2017)
As first step only implemented in yaapu9.lua (as draft) to show you my idea.
It's very helpful for all ArduPilot scripts to announce sounds and numbers on yaapu GCS.
I had the idea after realizing my SwitchMission script, where it's possible to select one of an undefined number of missions via upcount/restart pushbutton. Before that change you had to look at the display to select a preferred mission.
In AP script, the message is created by:
local function sound_to_yaapu(sound,number) -- sound or number has to be nil to be ignored
-- send a message to the yaapu-GCS containing a name of a soundfile and/or a number, to announce (not to display) there
if YAAPU:get()==0 then return end
if sound and number then
send_msg(INFO, string.format('##S:%s ##N:%02.2u', sound, number))
return
end
if sound then
send_msg(INFO, string.format('##S:%s', sound))
return
end
if number then
send_msg(INFO, string.format('##N:%02.2u', number))
end
end
As discussed separately, that's not an efficent use of CPU-power - especially for the older transmitters. We have to look for a better solution of that task.
scan messages against sequence ##S:soundfile and/or ##N:number and play sound(s) accordingly, but don't display the message
Successfully tested on OpenTX Companion and (precompiled) on real X9E(02/2017)
As first step only implemented in yaapu9.lua (as draft) to show you my idea. It's very helpful for all ArduPilot scripts to announce sounds and numbers on yaapu GCS.
I had the idea after realizing my SwitchMission script, where it's possible to select one of an undefined number of missions via upcount/restart pushbutton. Before that change you had to look at the display to select a preferred mission.
In AP script, the message is created by: local function sound_to_yaapu(sound,number) -- sound or number has to be nil to be ignored -- send a message to the yaapu-GCS containing a name of a soundfile and/or a number, to announce (not to display) there if YAAPU:get()==0 then return end if sound and number then send_msg(INFO, string.format('##S:%s ##N:%02.2u', sound, number)) return end if sound then send_msg(INFO, string.format('##S:%s', sound)) return end if number then send_msg(INFO, string.format('##N:%02.2u', number)) end end