* fixes the non-terminated fixed-string problem in lua-mixer-script
added some useful info to the script-line
make the popup menu to delete a script
* removed unneccessary comments
* intermediate fix
* tried to obey all comments to the code
and to eliminate further potential buffer-overflows
* fixed typo
* fixed async loading of lua scripts and update of widget
cleanup
* removed GCC pragmas (clang warn about them)
remove constexpr qualification (gcc accepts them because gcc-builtins are already constexpr, clang still warns about them)
* removed merge marker
* transferred respective OpenTX updates to HoTT telemetry
* integrated LUA function flushAudio from OpenTx
* sensor names moved to “untranslated.h”
reverted *.h.txt to original mainline content
removed leading "Z" in sensor name defines
* The set/reset switches for a logical switch are only processed if the are valid.
* Revert "The set/reset switches for a logical switch are only processed if the are valid."
This reverts commit c238108415aec39f64ba6bae4c86cfb3ea4713bc.
* fix handling of default values in mixer scripts
* revised the use of default value to be consistent to the past usage
* Limited autoformatting
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
`getfieldInfo` can now also take a source index as argument. Plus it was modified to also handle "telem1+" etc.
New functions `getSourceIndex(sourceName)` and `getSourceName(sourceIndex)` were added, which use the names shown on the
screen instead of the special names table used by `getFieldInfo` and `getValue`.
Indices are the same for all of the functions, so `getValue(sourceIndex)` also works with indices from `getSourceIndex`.
New iterator functions `sources([first[, last]])` and `switches([first[, last]])` for getting ranges of sources and switches.
`getPhysicalSwitches` was removed, as I consider the iterator function to be a better solution.
[Lua] Add setStickySwitch and getLogicalSwitchValue (#1056)
* Adds setStickySwitch to set the value of a stick logical switch
* Adds getLogicalSwitchValue to get the value of a logical switch by index
* Add filename to lua `model.getInfo()`
* Make `getModelNumberStr()` globally available
* Move variable extern
* Move constexpr to header, remove externs
* Perhaps .cpp should include its OWN header
* Relax assumptions about when Lua is called in foreground and background
* Start Lua cycle timer both in foreground and background
Do not assume that background/foreground alternates
* Lua is called at every Standalone GUI cycle instead of 5 Hz
Since Lua preempts every 50 ms or so, the GUI should remain responsive.
* In standalone script, only call Lua once per GUI cycle, to avoid messing up buffer handling.
* Revamped error reporting for Standalone and Telemetry Lua scripts
* Font size for Lua error is reduced from XL to L on color if LCD_W < LCD_H
* In drawTextLines, also possible linebreaks for opening brackets.
* Smaller font for error message on tall color screen
* Make titlebar height match font size on narrow LCD
* Issue #132
Added 16 shared memory variables which can be accessed bot from Lua widgets and other Lua scripts.
* Notice Only available on radios with color display
* Preliminary trims as keys for lua
Largely based on open-flysky implementation
* Add `isLuaStandaloneRunning()`
* Add more virtual events
* Tweak virtual events further
* Finish remapping keys to virtual events
* Move some virtuals to right trim hat
* Add missing "defined"
* Revert to common EVT_VIRTUAL_MENU mapping
* Make keys/trims reset backlight like other radios