Commit Graph
1238 Commits
Author SHA1 Message Date
philmozandGitHub 7aadf5e3ef fix(color): Slider control blocking RTN key, slider rotEnc activation (#3966)
* Fix for slider control blocking RTN key.

* Fix rotary encoder activation for slider.
2023-08-26 21:18:35 +10:00
Malte LangermannandGitHub b377a8b5d4 chore: SDIO conversion to HAL (#3182) 2023-08-13 18:56:39 +02:00
philmozandGitHub f7037a92b0 chore(color): Model setup page cleanup (#3899)
* Cleanup model setup page code. Make buttons consistent height.

* Remove unused object constructor.
2023-08-09 18:29:59 +10:00
philmozandGitHub 659a25a6cd fix: Fix 'PAGE <' key not working for menu toolbar (#3902) 2023-08-04 21:59:05 +10:00
philmozandGitHub 69338ab0ab chore(color): Libopenui refactor (#3614)
* 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.
2023-08-04 11:04:54 +10:00
philmozandGitHub 2dd76d0964 fix(Lua): Enable 'package' Lua library (#3786)
* Enable 'package' and 'string' Lua libraries.

* Change 'package' library to only load for color LCD radios.
Exclude 'string' library to match 2.8 functionality.
2023-07-10 19:42:12 +10:00
raphaelcoefficandMalte Langermann 40e7d8c365 libopenui: align keys on stdlcd 2023-06-25 14:32:39 +02:00
Raphael CoefficandMalte Langermann 2b100e0eb5 refact: ADC, switches and keys
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
2023-06-25 14:32:39 +02:00
gagarinlg 3ca63cbb9b chore(libopenui): update license 2023-05-18 14:56:37 +02:00
gagarinlg 1e2b4db1d2 chore(libopenui): replace license files 2023-05-18 14:55:56 +02:00
gagarinlg 2418f1114e chore: pull libopenui into the EdgeTX repository 2023-05-18 14:49:35 +02:00
gagarinlg 843e42b964 chore: remove libopenui submodule 2023-05-18 14:48:41 +02:00
philmozandGitHub f2936931f7 fix(color): Memory leaks when using USB mass storage connection (#3547)
* Fix memory leaks when using 'USB Storage (SD)' connection.
- Lua state 'cache' allocated to both lsScripts and lsWidgets; but only one was being released.
- Default theme bitmaps being reloaded without releasing previously allocated memory.

* Fix icons.
2023-05-17 18:28:29 +10:00
MichaelandGitHub fd7d359695 fix: RX stat labelling dependent on telemetry protocol (#3523)
* RX stat (formerly known as "RSSI") labeling dependent on protocol (RSSI/dbm, Rqly/%, Sgnl/-)  used for range check, multi rf tuning and low/critical warning settings pages

* chore: Bump libopenui

* removed define that was supposed to be for testing only

function getRxStatLabels(): wasting flash as inline, no need to be inlined

* removed inline on getRxStatLabels() - step 2
2023-05-17 11:17:35 +10:00
MichaelandGitHub c6188af631 Add setters for DynamicNumber prefix and suffix texts (#90)
required by RX stat labeling on range check, rf tuning, low/critical warning pages
2023-05-07 14:05:50 +10:00
7a083fe0f7 fix(color): Make size/appearance of number/text edit controls consistent with other UI elements (#3481)
* Fix minor layout issues arising from libopenui PR 89.

* chore: Bump libopenui

---------

Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
2023-05-07 14:04:35 +10:00
philmozandGitHub 51ce75f10e Make the size and appearance of the number and text edit controls consistent with other UI elements. (#89) 2023-05-07 11:25:50 +10:00
MichaelandGitHub 6b2bca510c fix(lua): Debugprint not working (#3472) 2023-04-17 20:15:47 +10:00
5622cb9c5c chore(color): Replace StaticText with LVGL labels on GVARS page (#3310)
* chore(ui): speedup gvars page

* Replace StaticText with LVGL labels.

* Further performance improvements.

* Remove diagnostics.

* Fix portrait layout.

* Refactor style to a separate class and use CHECKED state to control color of selected flight mode.

* Remove duplicate lines.

* User LVGL state and style for GV value font size selection.
Reduce the number of times the style_refresh state is changed.

* Center align name without needing hard wired offsets.

* Speed up page build time.

* chore: Bump libopenui
gagarinlg chore(ui): improve static text and window base speed (#88)

---------

Co-authored-by: gagarinlg <malte@langermann.net>
2023-03-26 19:10:56 +10:00
Malte LangermannandGitHub f84fbd01bf chore(ui): improve static text and window base speed (#88) 2023-03-26 18:16:28 +10:00
philmozandGitHub 8fc5a1c58e feat(color): Add LVGL scroll bar where needed (#3268)
* Add scroll bar to radio settings/config pages.

* Add scroll bar to mode settings/config pages and screen settings pages.

* For pages display via TabsGroup class. move the scroll bar setting to the 'body' window.

* Fix position of new line on Inputs and Mixes pages.

* chore: Bump `libopenui`
2023-03-24 11:37:21 +10:00
philmozandGitHub d56d641fb0 Set backSet background color on pop up dialog windows (#87) 2023-03-22 19:43:10 +10:00
philmozandGitHub 3e49724e11 Add scroll bar to menus where needed (#85) 2023-03-22 19:42:13 +10:00
Raphael CoefficandGitHub d57afea89e chore: Remove unused files (#3191) 2023-02-15 13:10:14 +10:00
Raphael CoefficandGitHub be3f8d74a8 feat(lua): Port of NodeMCU Lua53 read-only tables (#2994)
* 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
2023-02-09 20:29:56 +10:00
CliffandGitHub 0b8e4c6003 Allow using Segger RTT as debug output (#3052)
Firmware needs to be built with -DDEBUG=YES and -DDEBUG_SEGGER_RTT=YES to use this feature.
2023-01-23 09:08:31 +01:00
Raphael CoefficandGitHub acd95dfad4 fix(B&W): Avoid having constants in SRAM (#2993)
fix constness to avoid having constants in data segment 
.... and thus free some precious RAM
2023-01-18 20:12:35 +10:00
Raphael CoefficandGitHub e67d1a7895 fix: strings constness (#84) 2023-01-18 12:32:07 +10:00
Peter Feerick acd44516d0 fix(color): Display of signed values
Import fix for #2842
2023-01-18 11:52:46 +10:00
eshifriandGitHub d6185d924d fix: Display of signed values (#83)
* Fix display of the signed values
 with PREC1 and PREC2

* Use abs() for decimal digits output
 for negative numbers
2023-01-18 11:48:47 +10:00
Raphael CoefficandGitHub 9796c968f4 fix(MSD): confirmation dialog properly shown (#2743)
Prior to this fix, the confirmation dialog would crash because of an issue in libopenui and even then would not be displayed for the lack of the proper parent window.

Fixes #2741
2022-11-16 19:49:52 +10:00
raphaelcoeffic 5a81a22514 fix(window): fix crash in case LVGL parent is NULL 2022-11-15 08:41:27 +01:00
Raphael CoefficandPeter Feerick 062564cc41 chore: Bump libopenui for text clipping bugfix 2022-11-04 19:28:31 +10:00
Raphael CoefficandGitHub a08ccd00aa fix(drawSizedText): stop trying to be smart about text clipping (#82) 2022-11-04 19:14:17 +10:00
Raphael CoefficandPeter Feerick e154ee1dea chore: Bump libopenui for #2619 fix 2022-10-31 21:16:39 +10:00
Raphael CoefficandGitHub d174463d97 fix(table): re-implement LV_EVENT_RELEASE handler (#81)
Instead of calling `lv_table`'s handler, as this causes troubles when the selected cell is changed from within `LV_EVENT_VALUE_CHANGED`.

Fixes EdgeTX/edgetx#2619
2022-10-31 21:09:51 +10:00
Peter Feerick 6557f70a47 chore: Bump libopenui for #2649 fix 2022-10-31 19:19:21 +10:00
Raphael CoefficandGitHub a9b7f815f2 fix(NumberEdit): avoid calling setValue() to change the displayed string (#80) 2022-10-31 19:17:52 +10:00
Peter Feerick f426c1f828 chore: Bump libopenui for #2606 fix 2022-10-24 11:56:27 +10:00
Malte LangermannandGitHub fcb0e2cf5d fix(gui): missing % sign in choices (#79) 2022-10-24 11:48:00 +10:00
Peter Feerick 770c9bbde6 chore: Bump libopenui 2022-10-19 20:40:12 +10:00
Raphael CoefficandGitHub 4b85830ea2 Improve rotary encoder velocity support (#78) 2022-10-19 20:37:27 +10:00
Raphael CoefficandGitHub ba713b6b8d feat: Further improve rotary encoder acceleration (#2584)
* Improve rotary encoder acceleration

Fixes #2417

* Further improvement

* Fix simu compilation
2022-10-19 20:36:29 +10:00
Raphael CoefficandGitHub 584e194388 fix(X10): Simulated page up in menu toolbar (#2543)
Fixes #2542
2022-10-14 10:46:19 +10:00
Raphael Coeffic 4255642e7d Fix menu toolbar PageUp/PageDown 2022-10-13 19:21:10 +02:00
Peter Feerick b549820acb fix: Reset back to ETX branch
Idiot PBKAC merged wrong PR
2022-10-12 13:08:46 +10:00
Gábor BányászandGitHub 8a4a1b1b38 Speed up the initial menu filling (#77)
* Preset menu line counter. Disable update position during the fill.

* Code formating

* Redesign attempt with addLines() functions.

* .

* Menu::addLines fix for icons.

* Redesign to clean up

* Selection fix. Choice implementation.

* One more redesign.
2022-10-12 13:05:18 +10:00
Gábor BányászandGitHub 867d627b39 Speed up bulk menu addition. (#2516)
* Speed up bulk menu bar addition.

* libopenui reference
2022-10-12 13:04:17 +10:00
Raphael CoefficandGitHub 59b33622b8 fix(color): prevent recomputing points in NumberEdit() constructor (#2474)
Fixes #2452
2022-10-09 15:53:34 +10:00
df7d9a0fe0 fix(NumberEdit): do not call setValue() in constructor, use update() instead (#76)
This avoids writing a value when it is not necessary. All that is needed is to update the internal value and set the field string.

Co-authored-by: Raphael Coeffic <raphael.coeffic@frafos.com>
2022-10-09 14:40:11 +10:00