yaapu / FrskyTelemetryScript

A LUA telemetry script and widget for the Horus X10(S),X12 and Taranis X9D+,X9E,QX7 and X-Lite radios using ArduPilot frsky passthru protocol
GNU General Public License v3.0
431 stars 137 forks source link

yaapu9.lua: look for Soundsequence ##S: ##N: #203

Closed WillyZehnder closed 1 year ago

WillyZehnder commented 1 year ago

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

WillyZehnder commented 1 year ago

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.