* feature request #1635
- added MIN (-MAX -> -1024) as source
* fix rebase
* fix rebase
* change to use language strings for MIN/MAX instead of instance
updated CN and TX language file for MINuse -RESX for MIN instead of magi numbercode cleanup
* updated test sources
* updated JP language
* JP language: changed translation text
* updated HE language translations
* Include scale in getInput and insertInput
When using telemetry as an input, the scale field is used to convert from a
value with units (like volts or meters) to a percentage. I'd like to modify an
input's scale via Lua script. However this field does not seem to be supported
by the Lua API. This seems like an oversight, so I added it.
* chore: Add scale luadoc
* Refactor object creation logic.
Remove unused LVGL features.
* Remove unused files.
Fix height for widgets.
* Rename 'OpenTxTheme' class to 'EdgeTxTheme'.
Cleanup commented out code.
Cleanup unused code from 'etx_lv_theme.cpp'.
* More cleanup.
* Move more style code to etx_lv_theme.cpp
* Update license
* Make default button height match other controls.
* Fix curve edit layout.
* Fix layouts.
* FormWindow and FormGroup provided identical functionality - rename FormGroup to FormWindow and remove duplicate.
* Simplify menu icon handling.
Remove unused 'flysky.cpp' file.
* Fix window size change.
* Simplify page header code.
Fix statistics view page.
* Remove unused file.
Replace redundant 'Subtitle' class with a macro.
Fix compiler warnings.
* Fix compiler warning in LvglWrapper.cpp.
Remove unused code in static.h.
Simplify about page.
* Rename ICON_OPENTX to ICON_EDGETX.
* Fix github build error.
* Fix github build error (attempt 2).
* Move ButtonMatrix styling to etx_lv_theme.cpp.
* Scroll bar consistency.
* Use styles for ButtonMatrix text color.
* Use 'active' color for selected USB advanced setup buttons. Move error message to bottom of page.
* Create style for popup window title bar.
Simplify advanced USB setup code.
Remove unused libopenui/carousel.* files.
* Add style for modal popup content.
* Remove unused BUTTON_BACKGROUND flag.
* Replace GridLayout with FormWindow. Remove unused gridlayout.h file.
* Fix rebase.
* Merge ChoiceEx class into Choice class code.
Remove unused CurveKeyboard.
* Use LVGL bar for progress indicator.
Update only style colors when theme changes (don't recreate all style settings).
* Move ProgressDialog class to dlalog.h/dialog.cpp files.
* Simplify trim and slider code in main view.
Simplify the hardware inputs code.
Fix dialog size.
Remove unused code in layout factory.
* Cleanup unused code.
* Add style for FormWindow class.
Merge BaseNumberEdit class into NumberEdit class and remove BaseNumberEdit.
Remove more unused files.
Cleanup libopenui_config.h files.
* Re-organise libopenui include files to fix build error.
* Fix build error.
* Add missed styles to etx_lv_theme.cpp.
Delete commented out #includes.
More cleaning up of libopenui_xxx.h files and dependencies.
Re-enable LVGL CHECKBOX feature.
* Merge libopenui_helpers.h into opentx_helpers.h file.
* Fix firmware build.
* Use object constructors for LVGL object creation as suggested by gagarinlg.
Add style for number edit text alignment.
Fix background color for focussed control.
* Move color related stuff from libopenui_defines.h to colors.h.
Remove need for libopenui_depends.h file.
* Merge libopenui_types.h content into opentx_types.h file.
* Rename CheckBox class to ToggleSwitch.
* Restore code to update flight mode text color when theme changes.
* Cleanup some more unused code.
* Remove redundant theme.h file.
* Fix rebase.
* Fix button matrix style.
* Fix rebase
* Fix rebase
* Ensure correct initialisation of Choice object.
* Fix rebase.
* Make the slider control bigger to make touch activation easier.
* Fix build error.
* Fix slider logic and cleanup code.
* Use ACTIVE theme color for inputs, mixes, LS, GV and SF.
* Improved border width consistency and focussed state consistency.
* Remove duplicate copy of the default theme colors.
* fix: use keysGetMaxTrims() instead of MAX_TRIMS
* feat: add support for virtual trims
This is necessary for radios like X-lite where half of the trims are simulated
Add "hardware_defs" target to dump hardware defines from hal.h per target
Fixed hal.h definitions for switches & ADC inputs
Tools to generate hardware definitions from current hal.h
generator: add support for EXTx and analog switches
WiP
Add generated header to hardware_defs target
Add support for ADC input direction and index per GPIO port
Incredible: it compiles
Removed StdPeriph ADC driver
Works on QX7
Works on TX16S (VBat missing)
Switch driver using generated switches for stm32 targets
Switch driver with generated switches for simu
Use switch names from switch driver
Fixed single conversion handling
Fixed horus VBat reading
Added switch name
Fix warnings about bitfield offsets and GCC 4.4
This is caused by bitfields that cross type boundaries. In this particular case, it happens as the bitfield is not defined the same in `rtc_backup.cpp`.
Switches has already been moved to generic driver
Jitter measurement for each sample, not just for oversampled values
Moved periph clock init to the ADC driver
ADC & GPIOs.
Add switchInit() to init pins
Fix NV14 CMake
Fix taranis target
Fix NV14 (again)
Model audio files: use new interface for switch index
Fix X9-lite
Fix simu headers
Fix getSwitchName()
Add support for ADC switches
Fix switch warning YAML
Test only switches which are defined
Conversions tests for QX7 only on QX7
Fix X12S
Fix function switch names
Enable ADC periph clock before initialising channels
NV14: offset inputs for the sticks & fix switches
WiP: get rid of VSRCRAW and some more
Simu shall use normal ADC driver
fix x7
fix nv14
Fix 9x nav
fix 212x64
fix xlite
fix x9e
fix simu lib
fix unit tests
fix x7 tests
PWM stick values should be written directly into adcValues
... just like FlySky sticks.
fix x12s
fix nv14
Add some support for SPI ADC (only unit tests)
Remove `jq` usage
fix generate_yaml.py for newer libclang
fix pot config
fix stick names
Some YAML generator improvements
Max 16 Pots on COLORLCD
Fix some source names
Use 10 bits for switches to prevent overflow
Removed horus constants for switches & ADC inputs
Fix unit tests
Fix curve edit
Fix libsimulator
Fix function switches (tpro)
Refine ADC & analog API
Moved hardware definitions scripts and templates into own dir
cleanup API refine
Fix unit tests
Mixer: apply calibration only on required inputs
Place ADC switches after all other ADC inputs
Fix X12S
Remove useless TR_POTS_VSRCRAW, TR_SW_VSRCRAW, and TR_VSRCRAW
Cleanup redundant generated YAML parsers
Fixes Boxer rebase
Add boxer to generate-hw-defs.sh
Obsolete LUA exports
Add boxer ADC_DIRECTION
Split generate_hw_defs.py into multiple files
Some cleanup (+ LUA switches)
Fix AXIS definitions
Fixed translation strings declarations
Some rebase fixes
Remove some useless StdPeriph drivers
fix: set pin mode to reset state on usart deinit
fix: use canonical names for calibration data
fix: ADC driver does not care about unconfigured inputs
fix X12S ADC
Add support for ADC conversion chaining
Better X12S ADC implem
Moved X12S ADC driver to HAL/LL
Improve ADC driver separation
Fixed taranis & nv14
Moved PWM gimbals to HAL/LL
Removed useless TR_EXTRA_VSRCRAW
Fixed include guards
Small fixes
Renamed control inputs
Moved internal and external module pulse driver def to boards
Move more things to the generic_stm32 board
Remove STR_VMIXTRIMS
Added analog labels
Generate main control names
Misuse labels / short labels for main controls
Backward compatibility: sliders and legacy names
New keys driver
Let's get rid of StdPeriph headers in simu
Add jinja2 to CI workflows
Use `grep` instead of `sed`
chore: add python jinja2 oto msys setup script
Removed more static definitions and use dynamic ones instead
Fixes X9E
Fix x7 nav too
212 switch display
Fix default sliders
Removed NUM_STICKS
212 switch display working nicely
Surface radio 'stick' replacements
fix: switch, trim & rotary pin init
Remove old key drivers
Removed VKEYS
Removed ETX_FOURCC
Fixed SURFACE_NAME
Removed TR_VSWITCHES & TR_TRIMS_SWITCHES
Fix xpot switches
Store calibrated analogs in physical order
Use getSourceString in drawSource
Implement missing YAML read/write
Fix isSourceAvailableInInputs()
Fix isSourceAvailable()
Some surface fixes
Fix CLI debug
Ported colour UI of analog diagnostics to new ADC API
Small fixes
Better input mapping
Minor tpro fixes
Fix trims available
Remove TX mode choice on surface radio
Rename surface controls
Channel order alignement
Fix throttle warning
Fix checkTrims()
Fix pot config casting issue
Fix IS_SWITCH_FS()
Fixed input mapping
Fix fswitch auto-switch
Fixed storing / reading function switches in YAML
Fix enableVBatBridge() / disableVBatBridge()
Fix interesting mode conversion
Fix sources issues
Fix special funnction list
Proper function switch handling
128 GUI improvements
Fix compilation
Boxer cosmetics
128 hardware screen cosmetic
Fix TX12 switches
More switches fixes
Simplify CPU type handling
Fix flash size
Fixed page-up / page-down in libopenui
* Add options to disable radio and model menu tabs.
- Update radio and model data structs
- UI for color LCD radios
- Convert existing 'noGlobalFunctions' property.
- Language strings.
* Make 'theme' control specific to color LCD radios.
* Add B&W radio UI.
* Simplify code, reduce compiled code size.
Fix page count display on model select tab.
Fix GVARS for 212x64 radios.
* Collapse timer sections if timer is off.
* Remove 'Use global functions' checkbox from B&W model setup.
* Make preflight checks, throttle and view options sections expand & collapse (default collapsed).
* Fix build.
* Add view options to companion data classes, save and load values in YAML files.
Fix scrolling for radio setup view options.
* Add Companion UI for view option settings.
* Remove 'Mixes' from list of tabs that can be hidden.
* Updated Companion UI from elecpower.
* Use view options flags to enable/disable functionality:
- skip heli mixer logic if heli not enabled
- Remove heli, gvars and telemetry options from source selection if not enabled
* Remove 'flight mode', 'curve' and 'global variable' settings from input & mix editors if option disabled.
* Rename 'View Options' to 'Enabled Features'.
Put GVAR option under Flight Mode and indent text.
Make relationship between FM and GV more obvious.
* Remove global variable option dependency on flight modes.
Hide FM1-FM8 in global variables if flight modes hidden.
* Hide 'Custom Mixer Scripts' in source selection menu popup if disabled.
* Add translation strings for Hebrew language file.
* Fix typo. Add comment for double call to setCurrentTab.
* Add support for the '1x' repeat option for 'Play Script' special functions.
* Add Companion and B&W radio support.
* Fix B&W radio logic and layout.
* Add translation hooks.
* Adds option to align value widget label and value to left, center or right border of the widget zone.
* Cpn sync
* Typofix thx to @Eldenroot
* fix: Add `TW` translation
* fix: Two spaces for indent
---------
Co-authored-by: elecpower <neilh713@tpg.com.au>
* Store 'zone' rectangle dat in Lua registry and update it when the screen layout changes or full screen mode changes. Allows Lua widgets to adjust to layout changes.
* Call widget 'update' function is layout has changed.
* chore(lua): revert useless c light function change
This change was part of the eLua LTR patches (based on 5.1), whereby this feature was already integrated in Lua 5.2.
* feat(lua): port of NodeMCU Lua53 read-only tables
# Conflicts:
# radio/src/lua/CMakeLists.txt
# radio/src/lua/api_general.cpp
* fix(nv14): missing SDRAM definition
* fix: l_mathop
* fix: use float functions in drawPower()
* fix: ltable resize
* fix: correct name is "bit32"
* fix: first Lua context must be closed last
As the lookup cache is attached to that one
* Revert to Lua using double
* Ensure byte-code compatibility
* Fix possible compatibility issue with `lua_typename`/`luaL_typename`
* Fix Bitmap symbol table
* Re-add table lib for COLORLCD
* WiP: new module interface
* WiP: softserial timer DMA
* WiP: setup() and send() in one step
and remove methods specific to internal or external module
* fixes and extra port config
* horus targets
* module ports have moved
* T8 support (only internal module)
* fix nv14
* stupid GCC....
* disable BT
* remove nv14 telem driver
* remove old aux serial driver
* Move module buffers out of pulses.h
* Soft serial fixes and PXX1 support
* Fixed PPM module output
* Fixed CLI
* compilation fixes
* Ported bluetooth and flysky gimbal to new serial driver
* Re-enable soft-serial RX
* fixes and cleanup
* nv14 fixes
* Fix flysky gimbals
* Ghost module
* 16 bytes of RAM
* Remove getByte from module API
* Ghost cleanup
* fix: _half_duplex_input() must be called after usart init
* WiP
* more cleanup
* Remove board specific settings from PXX1 / PXX2 drivers
* A bit of PXX2 header cleanup
* Add support for OVER8 and ONEBIT
* Add some support for inverters (NV14 / EL18)
* Support NV14 power fixes in generic board
* Fix polarity handling
* Fix RX DMA
* Fix mixer not running
* Add soft-serial polarity control
* Quick fix for telemetry polling while module port is changed
* Fix bootloader DEBUG
* Fix MPM telemetry
* Fix pulse start
* DSM2 soft-serial fallback
* DSMP async module restart
* Fix CRSF LUA upstream
* Remove global variable telemetryProtocol
* Use HAL/LL constants
* Fix various issue with AFHDS3 and NV14/EL18 internal module
* Fixed S.PORT unit tests
* fix: update widx after writing at current index
* fix: init error condition
* Fix: possible infinite loop in _find_port()
* Add support for bidir S.PORT init
* Add support for "getLastByte" in HW serial driver
* PXX1: Add support for S.PORT based on IDLE callback
* Fix rebase error
* Fix softserial _rx_fifo_push()
* Add softserial support for waitForTxCompleted()
* Fix MPM flashing (internal / external)
* Fixed external MPM
* Activate RX DMA on internal module
Seems to work with serial passthrough without issues, at least on the L3R PRO.
* Fix softserial DMA on stdlcd F4 targets
* Add softserial support for 32bit timers (mostly TIM2)
* More precise soft-serial
* Fix MPM update using inverters & HW uart
* Raise S.PORT DMA/USART IRQ prio to achieve faster switching to input
* Remove useless delays
* Fix flashing external ELRS module
* Added a retry mechanism for FrSky S.PORT update
* Remove useless enableRx()
* External FrSky modules are all flashed via S.PORT
* Remove power management unit update
This was only used on the first batch of X-lite.
* Lua array indexes start at 1
* LUA model.setFlightMode: use array index to compute trim index
This allows for providing an incomplete table like this:
```
-- Disable T5 & T6 on FM0
modes = {}
modes[5] = 31
modes[6] = 31
t = {}
t["trimsModes"] = modes
model.setFlightMode(0, t)
```
* Remove warning & cleanup
* Fix trim value constraints in model.setFlightMode()
Suppress `EVT_KEY_BREAK(KEY_PGDN)` after `EVT_KEY_LONG(KEY_PGDN)` on targets which don't have a physical `KEY_PGUP`.
This way, the sequence is now clean: no more `EVT_VIRTUAL_NEXT_PAGE` emitted after `EVT_VIRTUAL_PREV_PAGE` on these targets.
* Moved getFieldInfo and getValue up right after related functions
* Modified getValue to return a valid status, so Lua can see if it got zero because of invalid source id
* Added new getSourceValue Lua function per Issue #781
Also added alias getSourceInfo for getFieldInfo
* Updated according to comment https://github.com/EdgeTX/edgetx/pull/2175#issuecomment-1245605114
* Replaced isFresh() by !isOld() as requested in https://github.com/EdgeTX/edgetx/pull/2316#issuecomment-1246759370
* Clean up `lua_pushtablenil` - tables cannot hold nil values
* Changed isFresh() to !isOld() ... AGAIN
* Return both `!isOld()` and `isFresh()`
* Return nil for all values if the item does not exist
* Return 0 instead of pushing three nil values
* Update documentation
* 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>