Commit Graph
336 Commits
Author SHA1 Message Date
gagarinlgandRaphael Coeffic 4ef2e50563 add missing file to colorlcd CMakelist 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
Raphael Coeffic 93b8bf129c Moved FreeRTOS to submodule (v10.4.6) 2022-04-03 17:01:58 +02:00
Raphael Coeffic 346de7ece4 Move extmodule_driver to stm32 common part
And add support for F2
2022-03-20 16:22:13 +01:00
Raphael Coeffic 0bb42b79ef Add newer CMSIS headers 2022-03-20 16:22:13 +01:00
Raphael Coeffic a955112160 Added newer CMSIS STM32F4xx 2022-03-20 16:22:12 +01:00
Raphael Coeffic 3f6f1499b7 Added STM32F4xx_HAL_Driver 2022-03-20 16:22:12 +01:00
88a4458cfe fix: Resolve some issues with touch TE_SLIDE_END, and tapCount on NV14 (#1434)
* move TE_SLIDE_END handling for slide inertia to libopenui
reset tapCount on TE_SLIDE_END on NV14

* Bump libopenui

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2022-01-21 20:29:18 +10:00
Peter FeerickandPeter Feerick e4369af048 [libopenui] Fix screen widget layout line color 2021-12-24 13:08:55 +10:00
843d1be868 Fix wrong Chinese characters being displayed (#1257)
* Fixed wrong index calculation.

* Fixed font generation, indexing will goes wrong when no extra chars bitmap is present.

* Image width exceeded 16384 will cause trouble in CJK.

* Include libopenui update

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2021-12-17 10:32:28 +11:00
Peter Feerick dbd41d2ea9 [libopenui] Change touch end processing 2021-12-13 07:41:15 +10:00
Peter Feerick b7efc8a8f5 [libopenui] Fix repeated touch events and sliders 2021-12-12 20:32:56 +10:00
Peter Feerick 79e52521ac [libopenui] Fix for Curve edit not working #1087 2021-12-08 21:48:20 +10:00
Peter Feerick 3ab896ba2e [libopenui] Fix touch end segf, compiler warnings 2021-12-02 10:32:01 +10:00
Peter Feerick 316e18f800 Bump libopenui (non-touch compile bug) 2021-11-30 22:19:40 +10:00
Peter Feerick 2bdf1ff600 [libopenui ] Fix enable/disable popup menu filters
Can now enable and disable filters in popup menus (i.e. source, switch)
Active filter is now also highlighted
Use page keys to scroll through filters if no touch
Resolves #228
2021-11-30 21:19:01 +10:00
jfrickmannandPeter Feerick 81cb94a4bf Added string constants to the read-only tables in Lua 2021-11-29 12:00:50 +10:00
Peter Feerick 95f853f54e [libopenui] Fix touch slide intertia
Thanks @gagarinlg!
2021-11-26 20:38:53 +10:00
Peter FeerickandPeter Feerick b3cbf73aa0 Enable lua table for colorlcd, not just horus 2021-11-25 11:18:33 +10:00
Peter Feerick a1d279a552 Bump libopenui to for #1077 fix 2021-11-21 20:56:40 +10:00
Raphael CoefficandRaphael Coeffic f3301e6210 Added control line and bitrate callbacks
And some additional clean-up
2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic aa7b0143bd Add active polling on UART buffer and bigger USB buffers 2021-11-21 11:18:35 +01:00
Peter Feerick 8f55fb0ffa libopenui: NumberEdit set min/max if fast scroll goes out of bounds
Resolves #399
2021-11-18 11:17:43 +10:00
Peter Feerick 38308f6bef libopenui: Adjust theme constants used by Menu 2021-11-16 11:52:46 +10:00
Peter FeerickandPeter Feerick 574658d616 Bump libopenui for companion PR 2021-11-16 11:21:04 +10:00
Peter Feerick b4903d8d6f Bump libopenui 2021-11-12 11:53:07 +10:00
Peter Feerick f1d50c585a Bump libopenui, resolves #1017 2021-11-10 11:18:45 +10:00
Peter FeerickandGitHub e6697639c7 Rename modelBmp using new 'displayName', add more options (#544)
* Make img buf only size of img not whole widget

* Don't draw buffer if there's no image

* If there's no image, draw model name

* Add some options, draw model name if img not set
Add options for text colour, size, fill enable and colour

* Use valid values for defaults

* Get right colours

* Add concept of a 'friendly name to widgets'
Allows for separation of internal and user visible names

* Use new theme constants

* Use right version of libopenui

* `displayName` instead of `friendlyName`

* Allow using theme colour or custom for name
2021-11-08 21:27:38 +11:00
c59f579bbe Add special function to disable the touch screen (#942)
* added a new special function to disable the touch screen

* Bump libopenui

* Don't try to disable touch if no hardware touch

* Disable processing of SF if no touch hardware

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2021-10-25 23:20:57 +11:00
2b8dfeef59 Fix PNG transparency not working 🙂 (#878)
* Force BitmapBuffer format for widget ModelBmp and the file viewer
This patch run with the patch fix-transpareny in libopenui

* Bump libopenui

Co-authored-by: Runsys16 <rene.negre@orange.com>
2021-10-24 10:58:30 +11:00
Peter FeerickandPeter Feerick 3e8faa381b Bump libopenui, add needed const 2021-10-22 21:03:16 +11:00
rotorman 78489a69c0 Removed obsolete CooCox CoOS. 2021-10-02 15:05:21 +02:00
Kevin KoenigGitHubkkoenig1@optonline.com <kkoenig1@optonline.com>Peter Feerick
2f65ec4c58 Lots of color fixes and screen enhancements (#833)
* consolidated all color fixes and screen enhancements into one new branch

* Bump libopenui

* enhanced telementry sensor display

* fix discover and add sensor buttons on NV14.

* changed quick menu to not use theme colors as per JimB.  Fixed telemetry buttons for NV14

* fix colors on trainer page

* Merge cleanup

* Update libopenui

Co-authored-by: kkoenig1@optonline.com <kkoenig1@optonline.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2021-09-29 22:27:11 +10:00
Peter Feerick ecbe89c0f4 Update libopenui - Fixes #767 2021-09-24 19:35:59 +10:00
Raphael CoefficandPeter Feerick 64a87812bb [color] do not use setValue() in SourceChoice / SwitchChoice
This potentially deletes the source/switch choice, which then triggers a "use-after-free".

Resolves #759
2021-09-20 11:04:11 +10:00
CliffandGitHub 3dedcad75a Category editor (#725)
* Allow model moving between categories

* Initial Commit - Categories Editor

* Don't allow move of active models & save

* Create group for categories, add, remove, delete working.

One glitch on add still...

* allow index choice on tabs page build

* Don't allow setting name null

* Change layout

* Null terminate string + save

* Optionally hide delete button

* Allow add a new model on touch if there are none

* Remove seperator

* Fix compiler warning

* Assign not compare

* Add Translation Strings for Model Categories and Models

* Use translated strings

* Update libopenui

* Add extra newline so scrolls proper

* Update libopenui
2021-09-18 21:21:57 +10:00
Raphael Coeffic b9544afe6a Update libopenui 2021-09-13 11:13:49 +02:00
Raphael Coeffic 118fc26374 WiP Windows build workflow 2021-09-13 11:13:08 +02:00
Kevin KoenigGitHubkkoenig1@optonline.com <kkoenig1@optonline.com>Peter Feerick
8f8374f3b9 Move sourcechoice and switchchoice to ChoiceEx implementation (#691)
* move sourcechoice and switchchoice to ChoiceEx implementation

* removed getTicks parameter from ChoiceEx.  Turns out it can just access timer directly

* clean up keyboard support for topbar.cpp, protect against crash in keyboard

* Switch back to edgetx libpenui and sync

* Formatting

Co-authored-by: kkoenig1@optonline.com <kkoenig1@optonline.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2021-09-13 17:09:13 +10:00
542213de11 Add Bluetooth Trainer Options in Model Setup (#686)
* Initial Commit, Bluetooth Trainer options

* MasterBt & Slave working

* Cleanup BT Trainer

* Add extra defines so still works bluetooth disabled

* Add long string for not connected

* Make btMenu popup global

Also fixes not disconnecting if switches from master <-> slave bluetooth.

* Update libopenui

* Remove Global popup, add checks to if pop-up open

* Add subclass with an popup-opened bool

* Refresh GUI on BT mode change, except if pop-up open

* Don't update if OSK open

* Autoformatting

* Make trainer bottom spacer apply to all touch scns

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
2021-09-13 12:00:14 +10:00
Raphael Coeffic 2e767a8d6b Updated libopenui 2021-09-05 19:25:47 +02:00
Raphael Coeffic e700870f70 Updated libopenui to fix crash with software keyboard 2021-09-03 09:49:14 +02:00
Peter Feerick 57dd1bd779 Update libopenui 2021-08-30 23:21:30 +10:00
jfrickmann 5fd78ce0d7 Updated libopenui 2021-08-26 10:49:45 -04:00
Raphael Coeffic 44001fee50 updated libopenui 2021-08-22 19:42:50 +02:00
Raphael Coeffic 7e5397a8d2 Updated libopenui 2021-08-18 06:32:37 +02:00
Raphael Coeffic 7f6b1c7924 Updated libopenui 2021-08-04 07:19:31 +02:00
Raphael Coeffic 9a112977f8 Update libopenui 2021-08-02 10:46:18 +02:00
Raphael CoefficandGitHub 704c03a422 Merge pull request #499 from EdgeTX/freertos
FreeRTOS Integration
2021-07-31 18:42:39 +02:00
Raphael Coeffic 5a272cbf89 Update libopenui to include a fix for checkboxes
Resolves #444
2021-07-31 18:12:45 +02:00