* Special Function to set main screen (#2135)
* chore: Add new SF to LUA constants list
* Companion support
* Formatting
* get rid of magic number
* Add function to get the number of custom screens
* Change screen numbering from 0-based to 1-based.
* Allow SetScreen custom function for Color LCD only
* add range protection
* cleanup
* yet, range protection once again
* fix: paintSpecialFunctionLine can't alter SF param data
* Fix screen initialization in companion
* move screen switching to the UI
* Trigger view change from guiMain()
* chore: Change "SET" to "Set" for consistency
* fix: Somehow missed extra comma in `TW`
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
Co-authored-by: elecpower <neilh713@tpg.com.au>
Co-authored-by: Raphael Coeffic <raphael.coeffic@frafos.com>
* First build
* Fix X9
* Update api_general.cpp
* Update translations.h
* clean up translations
* fix: B&W option handling, remove magic numbers, cleanup
- Remove references to invertRotary, change to RotEncDir or similar
- Add compatabilty importing to companion, firmware
- Rename Lua API call
- Move magic numbers to enum
- Improve B&W option handling so it doesn't apply changes while in menu
* chore: yaml regen
* fix: Add missing guards for X9D/X9D+
* fix: Wrong enum name in simu
* fix(cpn): Use correct names for UI elements
* fix: Translations
* fix: Allow `rotEncMode` in all yaml due to x9d var
Of the three X9D variants, the X9D+2019 is the only one that
has a rotary encoder as standard. However, as the base config
file is for the X9D, this meant it wasn't reading or writing the
config value. Rather than add a seperate config file for it for
a single variable, simple to just allow it across all targets.
* fix: Companion string, change colorlcd to `Choice`
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
* 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.