sharedcontains data that is shared between the main telemetry script and the loadable screens. Notice that the functions
shared.runare also shared this way.
loadScriptfunction, which returns the loadable script as a chunk of code. The code is executed with
sharedas the argument, and the loadable script adds a new
runfunction to the
shared.runis called by
runin the main script.
createfunction loads the file
loadable.luain the folder /WIDGETS/<widget name>/, and calls it immediately as described in the previous section. It passes
optionsas arguments to
loadable.lua. This scripts adds the functions
loadable.lua, and is only loaded if the widgets is in fact being used. Therefore, if the widget is not used, only the small amount of code in
main.luais loaded into the radio's memory.