Commit Graph
72 Commits
Author SHA1 Message Date
f3cabd42f7 chore: use settings from radio JSON files instead of hal.h (#7411)
Co-authored-by: 3djc <3djc@gh.com>
2026-07-13 10:15:50 +10:00
philmozandGitHub 75fb538663 chore: update to LVGL 8.4 (#5038) 2025-05-05 11:39:38 +10:00
Peter FeerickandGitHub 839cfbd53c chore: more OTX to ETX housekeeping (#5396) 2024-08-14 21:02:29 +10:00
Raphael CoefficandGitHub d575242c0f refactor: bootloader & cmake cleanup (#5232) 2024-07-07 21:06:59 +10:00
961c75784e feat: Fatfish F16 support (main) (#4485)
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2024-06-30 11:55:35 +10:00
Raphael CoefficandGitHub 0399858a76 perf(color): reduce bootloader size (#5068) 2024-06-02 16:07:00 +10:00
6579905088 chore(hal): remove StdPeriph (#5023)
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com>
Co-authored-by: Malte Langermann <malte@langermann.net>
Co-authored-by: 3djc <3djc@gh.com>
Co-authored-by: Richard Li <richard.li@ces.hk>
2024-06-01 11:45:40 +10:00
e9d7428e0b perf: Update to LVGL 8.3 (#3279)
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
2023-11-07 20:57:45 +10:00
1af8b78256 refactor: DMA2D and LTDC conversion to HAL/LL (#3036)
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2023-10-23 18:58:02 +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
MichaelandGitHub ab5f44bacf chore: Comment out the top two trace flooding calls (#3767)
- only relevant in debug mode
2023-07-06 11:10:12 +10: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
RistoandGitHub 386f8e6342 fix(TX16S): LCD clock speed lowered to within spec (#2127) 2022-07-15 18:34:27 +10:00
Raphael CoefficandRaphael Coeffic 8d9734f7d1 Fix first LCD layer address used 2022-06-17 05:34:47 +02:00
Raphael CoefficandRaphael Coeffic 40eb89e6ed lcd driver: use LVGL direct mode or rotation in driver
see https://forum.lvgl.io/t/v8-display-driver-double-buffer-low-fps-high-cpu/6901/19
2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic c1cb76823a Fix glitches 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic db684893e2 Refresh screen via call back set by lcdSetFlushCb 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic 66cdab37ff Fixed line interrupt flags 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic 7417b6568b Some cleanup & reformating 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic 59c5e22620 Copy draw buffer into frame buffer after last vertical line
TODO: get rid of the blocking DMA copy
2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic b827376acb Moved frame buffers to lcd.cpp 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic ee0c37157d Remove legacy fonts and make the bootloader compile with LVGL 2022-06-11 15:38:08 +02:00
Raphael CoefficandRaphael Coeffic 86152da85d Remove scratch buffer 2022-06-11 15:38:08 +02:00
gagarinlgandRaphael Coeffic 8d6a7c2da5 preparation for PL18, differentiate between physical and UI screen size
adapt to partial draw calls from LVGL
2022-06-11 15:38:08 +02:00
gagarinlgandRaphael Coeffic fb7a7364a4 just something to play with lvgl
simu is working partially
TX16S has worked, is now broken, due to changes to make simu work

working means, lvgl shows something on the display and handles touch events

to stop libopenui from interfering this is needed in libopenui:

diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 09cc3d3..cda095f 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -79,7 +79,7 @@ void MainWindow::checkEvents()
   if (touchPanelEventOccured()) {
     short lastDeltaX = touchState.lastDeltaX;
     short lastDeltaY = touchState.lastDeltaY;;
-    touchState = touchPanelRead();
+    //touchState = touchPanelRead();
     touchState.lastDeltaX = lastDeltaX;
     touchState.lastDeltaY = lastDeltaY;
   }
@@ -177,6 +177,7 @@ void MainWindow::invalidate(const rect_t & rect)

 bool MainWindow::refresh()
 {
+return false;
   if (invalidatedRect.w) {
     if (invalidatedRect.x > 0 || invalidatedRect.y > 0 || invalidatedRect.w < LCD_W || invalidatedRect.h < LCD_H) {
       TRACE_WINDOWS("Refresh rect: left=%d top=%d width=%d height=%d", invalidatedRect.left(), invalidatedRect.top(), invalidatedRect.w, invalidatedRect.h);

add eclipse projetc files and helper scripts

some cleanup and fix simu

NV14 simu and TX16s simu are working with lvgl
no more magic numbers
added files for a lvgl wrapper class for initialization

moved lvgl initialization to LvglWrapper
code cleanup
started implementing a widget as a drawing target for libopenui

with some additional changesin libopenui, the libopenui ui can be displayed on a lvgl canvas

fix lvgl full screen canvas

update personal project files

add file with patch instructions for libopenui

works on NV14 with a canvas as the drawingtarget for libopenui and direct touch handling by libopenui

fix indentation

enabled double buffering for LVGL using the LCD frame buffers
transparancies are broken on TX16s
simulator does not work
untested on NV14

simu for NV14 and TX16S run and work mostly
works mostly on NV14 and TX16S

some pop ups (e.g. USB) flicker
LUA full screen apps won't display anything

touch handling still done by libopenui
on TX16S lvgl widgets are rotated by 180°

untested on all other radios

fix using of commeted out function. No touch handling for LVGL right now

rotate screens, so that libopenui and LVGL have the same screen rotation

removed the need to rotate images and fonts when using LVGL
currently the changes can be easily reverted

deleted lvgl copy

building with lvgl as unmodified submodule works

move lv_conf to radio/src

delete eclipse project files

use specific branch for lvgl

use libopenui lvgl branch
remove now unneeded help.txt

add missing file to colorlcd CMakelist

fix image display problems in TX16S simulator

just something to play with lvgl
simu is working partially
TX16S has worked, is now broken, due to changes to make simu work

working means, lvgl shows something on the display and handles touch events

to stop libopenui from interfering this is needed in libopenui:

diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 09cc3d3..cda095f 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -79,7 +79,7 @@ void MainWindow::checkEvents()
   if (touchPanelEventOccured()) {
     short lastDeltaX = touchState.lastDeltaX;
     short lastDeltaY = touchState.lastDeltaY;;
-    touchState = touchPanelRead();
+    //touchState = touchPanelRead();
     touchState.lastDeltaX = lastDeltaX;
     touchState.lastDeltaY = lastDeltaY;
   }
@@ -177,6 +177,7 @@ void MainWindow::invalidate(const rect_t & rect)

 bool MainWindow::refresh()
 {
+return false;
   if (invalidatedRect.w) {
     if (invalidatedRect.x > 0 || invalidatedRect.y > 0 || invalidatedRect.w < LCD_W || invalidatedRect.h < LCD_H) {
       TRACE_WINDOWS("Refresh rect: left=%d top=%d width=%d height=%d", invalidatedRect.left(), invalidatedRect.top(), invalidatedRect.w, invalidatedRect.h);

add eclipse projetc files and helper scripts

some cleanup and fix simu

NV14 simu and TX16s simu are working with lvgl
no more magic numbers
added files for a lvgl wrapper class for initialization

moved lvgl initialization to LvglWrapper
code cleanup
started implementing a widget as a drawing target for libopenui

with some additional changesin libopenui, the libopenui ui can be displayed on a lvgl canvas

fix lvgl full screen canvas

update personal project files

add file with patch instructions for libopenui

works on NV14 with a canvas as the drawingtarget for libopenui and direct touch handling by libopenui

fix indentation

enabled double buffering for LVGL using the LCD frame buffers
transparancies are broken on TX16s
simulator does not work
untested on NV14

simu for NV14 and TX16S run and work mostly
works mostly on NV14 and TX16S

some pop ups (e.g. USB) flicker
LUA full screen apps won't display anything

touch handling still done by libopenui
on TX16S lvgl widgets are rotated by 180°

untested on all other radios

fix using of commeted out function. No touch handling for LVGL right now

rotate screens, so that libopenui and LVGL have the same screen rotation

removed the need to rotate images and fonts when using LVGL
currently the changes can be easily reverted

deleted lvgl copy

building with lvgl as unmodified submodule works

move lv_conf to radio/src

delete eclipse project files
2022-06-11 15:38:08 +02:00
rotormanandRisto fc2142ec78 Changed uniformly to EdgeTX boiler plate (also added boiler for files that were missing it). 2021-10-02 14:22:01 +02:00
RistoandGitHub f665ce5a9d DMA2D configuration error fix (-DDEBUG_WINDOWS) (#190)
* Fixes DMA2D ConfError

* Check configuration and transfer errors

Check for DMA2D configuration and transfer errors and do not enter the otherwise endless while loop. Thx to @raphaelcoeffic for the tip.
2021-06-11 15:56:30 +02:00
Raphael Coeffic 199afb8efa Fixed T18 support 2021-05-28 09:40:46 +02:00
Raphael CoefficandRaphael Coeffic b96faad908 Clean-up + fix + debug 2021-05-24 16:23:06 +02:00
Raphael Coeffic 2fead2bc39 Use the register reload interrupt instead of polling VSYNCS in CDSR 2021-05-23 20:24:35 +02:00
Raphael Coeffic 20f5f3c4d1 ltdc: wait auf LTDC_CDSR_VSYNCS raising edge after register reload command 2021-05-23 19:08:48 +02:00
Raphael CoefficandRaphael Coeffic 95aa02cedd Switch the framebuffer address rather than using 2 LTDC layers 2021-05-23 08:19:56 +02:00
Raphael Coeffic cc5ae4d2a9 Small fixes
- no double SD card init
- removed "noHighlightCounter" warning
- wipe the screen buffers before setting up the layer (removes shadow image on boot)
2021-05-09 11:02:57 +02:00
Raphael CoefficandRaphael Coeffic 12ede2ca62 Fixed inverstion issue on radio
Spoiler: only some bitmaps used to be inverted. Added masks and fonts now in inverted mode to use the same functions.
2021-05-06 12:55:59 +02:00
Raphael CoefficandRaphael Coeffic 3bf5d8e177 Somehow working driver for the radio 2021-05-06 12:55:59 +02:00
Raphael CoefficandRaphael Coeffic 06335e596d Added scratch buffer and use the modifed drawFilledRect() (see libopenui#15) 2021-05-06 12:55:59 +02:00
Raphael CoefficandRaphael Coeffic ca36c9595e Moved simu LCD buffer to simu target 2021-05-06 12:55:59 +02:00
Raphael CoefficandRaphael Coeffic 1716e24260 Missing method for COLORLCD 2021-05-06 12:55:59 +02:00
3djc efa8f5520b Merge fixes 2021-04-08 14:20:25 +02:00
3djc 70d24506da Merge branch '2.3' into 2.4
# Conflicts:
#	radio/src/fonts/480x272/font_dblsize.png
#	radio/src/fonts/480x272/font_xxlsize.png
#	radio/src/gui/128x64/model_setup.cpp
#	radio/src/gui/128x64/radio_setup.cpp
#	radio/src/gui/480x272/model_receiver_options.cpp
#	radio/src/gui/480x272/model_setup.cpp
#	radio/src/gui/480x272/radio_calibration.cpp
#	radio/src/gui/480x272/radio_hardware.cpp
#	radio/src/gui/common/stdlcd/draw_functions.cpp
#	radio/src/gui/gui_common.cpp
#	radio/src/keys.h
#	radio/src/lua/interface.cpp
#	radio/src/pulses/afhds3.h
#	radio/src/rtos.h
#	radio/src/switches.cpp
#	radio/src/targets/common/arm/stm32/aux_serial_driver.cpp
#	radio/src/targets/horus/CMakeLists.txt
#	radio/src/targets/horus/lcd_driver.cpp
#	radio/src/targets/horus/startup_stm32f42_43xxx.s
#	radio/src/targets/taranis/CMakeLists.txt
#	radio/src/telemetry/crossfire.h
#	radio/src/telemetry/multi.cpp
#	radio/src/translations.cpp
#	radio/src/translations/it.h.txt
#	radio/src/translations/untranslated.h
#	radio/util/font2png.py
#	tools/commit-tests.sh
2021-04-08 11:42:28 +02:00
3djc 7613f72ec5 Tidy up 2021-03-10 16:54:01 +01:00
3djc fde097a1d6 TX16S touch interface working 2020-10-08 20:40:23 +02:00
Bertrand Songis 42a3198568 Merge with latest 2.3 2020-10-07 21:01:45 +02:00
3djcandGitHub 0ff6c0e5ae Fix nightlies (#7765) 2020-06-24 12:35:28 +02:00
3djcandGitHub 2d01916055 Preliminary T18 support (#7581) 2020-06-22 21:15:47 +02:00
Bertrand Songis 71ec1db9f6 Merge with latest 2.3 2020-06-18 11:14:07 +02:00
Bertrand Songis f7a3aeac74 Cosmetics 2020-06-02 09:18:21 +02:00
3djcandGitHub c8b31fc904 Secure screen DMA transfers (#7657)
Secure DMA write to LCD buffer
2020-06-02 09:16:41 +02:00
Bertrand Songis 40583276ca Add the definition LCD_VERTICAL_INVERT 2020-01-15 17:21:57 +01:00
Bertrand Songis 2e6ec7bc21 Cosmetics 2020-01-12 18:11:09 +01:00