Commit Graph
82 Commits
Author SHA1 Message Date
4e49ac68be feat(colorlcd): Special Function to set main screen (#2160)
* 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>
2022-09-07 21:40:34 +10:00
MichaelandGitHub ce8cc0b540 Fix missing log steps at 0.1s period (#1967)
fixed issued where log steps would be missed due to 10ms timer resolution
- simulator: allow for one get_tmr10ms() tick (10ms) deviation
- radio: switched to FreeRTOS software timer at user requested period

code cleanup
log.cpp: made variable lastLogTime static
log.cpp: deleted unused variable g_logError
functions.cpp, logs.cpp, sdcard.h: renamed variable logDelay to logDelay100ms to show it is scaled to 100ms increments
2022-06-27 20:12:47 +02:00
Raphael CoefficandRaphael Coeffic ac84ac1397 Fix & simplify fatal screens 2022-06-17 05:34:47 +02:00
Raphael CoefficandRaphael Coeffic 479e8ad244 Fix direct drawing for special cases 2022-06-17 05:34:47 +02:00
Raphael CoefficandRaphael Coeffic e75ec459f1 Cleanup 2022-06-13 22:43:45 +02:00
Raphael CoefficandRaphael Coeffic a013fccc78 fix: full screen dialogs 2022-06-11 15:38:08 +02:00
gagarinlgandRaphael Coeffic 809480bc6a fix fatal error screens with LVGL 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
gagarinlgandRaphael Coeffic 9633f3cfeb use updated libopenui
fix libopenui/lvgl run order
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 e5f7da0802 Start VCP serial according to config 2022-03-20 16:30:59 +01:00
Raphael Coeffic b39baa2360 Use USB VCP as a normal serial driver as well 2022-03-20 16:22:14 +01:00
Raphael Coeffic 530d395204 WiP 2022-03-20 16:22:14 +01:00
Raphael CoefficandPeter Feerick 09c49e24ee Remove SKY9X target 2022-01-29 14:40:17 +10:00
Raphael Coeffic f93cac3b1d Make USB serial dependent on USB_SERIAL rather than DEBUG 2021-12-17 15:17:49 +01:00
Raphael CoefficandRaphael Coeffic 6b94c2f45d Small fixes for TX16S 2021-11-21 11:18:35 +01:00
Raphael CoefficandRaphael Coeffic b1b3423844 Use stream buffer for CLI 2021-11-21 11:18:35 +01:00
gagarinlgandPeter Feerick ced9df9510 started implementing backlight tracking (unfinished)
horus touch driver internally tracks touch state and returns the state on read to make in independed of the mainwindow touchState
2021-11-16 11:21:04 +10:00
Raphael Coeffic 72859ad6d1 WiP 2021-11-10 11:06:59 +01: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
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
Raphael Coeffic 0e4201f25d WiP 2021-07-31 18:46:38 +02:00
jfrickmann c62aac7bde Lua task preempts long running scripts instead of killing them
Ported to EdgeTX from https://github.com/opentx/opentx/pull/8194
2021-07-22 14:41:53 -04:00
Raphael Coeffic 430902ae6f Prevent USB pop-up items to be added multiple times
Resolves #184
2021-06-11 07:01:15 +02:00
Raphael CoefficandRaphael Coeffic 5960d0aac2 Moved MPM failsafe check to the UI task
Resolves #87
2021-05-26 23:21:34 +02:00
Raphael CoefficandRaphael Coeffic b96faad908 Clean-up + fix + debug 2021-05-24 16:23:06 +02:00
Raphael CoefficandRaphael Coeffic 0bb9994ac5 Allow disabling USB connection by discarding the pop-up menu 2021-05-24 16:23:06 +02:00
Raphael CoefficandRaphael Coeffic 6b9abe0670 Remove obsoleted code 2021-05-24 16:23:06 +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 728ed13c7e Added "USB plugged" screen 2021-05-09 15:56:19 +02:00
Raphael CoefficandRaphael Coeffic 1fa99fdeb2 Glider wizard running in simu
Text fields are still displayed as a black box (needs to be fixed)
2021-05-06 12:55:59 +02:00
Raphael Coeffic ef6f2d0c57 Scrolling from view to view works now
And quite some bugs & crashes fixed.
2021-04-18 07:57:42 +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
Bertrand Songis 889f645c1a pushEvent insteado of putEvent 2021-03-12 11:07:31 +01:00
3djcandGitHub 1f01fa6d47 Radiomaster T8 (#8219) 2021-01-15 17:19:25 +01:00
Bertrand Songis 0f87115dc4 Update to latest libopenui 2020-12-04 16:37:42 +01:00
3djcGitHub3djc <Th1sisfmyofmyo>
87cd9047b1 2.4 continued (#8092)
Quite a bit of work on 2.4

Co-authored-by: 3djc <Th1sisfmyofmyo>
2020-11-14 14:55:37 +04:00
3djc 49aefb49c9 Default to screen baclight ON 2020-10-08 18:53:01 +02:00
3djc 3fc62fff83 Default to screen baclight ON 2020-10-08 09:31:46 +02:00
Bertrand Songis 42a3198568 Merge with latest 2.3 2020-10-07 21:01:45 +02:00
DanielGeAandGitHub 035cc6c031 Brightness adjust from backlight function (#7680)
Adjust brightness from backlight function
2020-07-31 17:06:11 +02:00
Bertrand Songis 71ec1db9f6 Merge with latest 2.3 2020-06-18 11:14:07 +02:00
3djcandGitHub ab8913052c Colorlcd popup improve (#7740)
Popups improvement
2020-06-15 11:11:57 +02:00
Bertrand Songis e7f15ee113 Merge with latest 2.3 2020-01-14 17:34:13 +01:00
Bertrand SongisandGitHub 8c3f226a6e Bsongis/modules sync issue 7288 (#7294)
Fixes #7288
2020-01-13 23:43:13 +01:00
Bertrand Songis 0626b31dfe Merge with latest 2.3 2020-01-08 16:35:30 +01:00
3djcandBertrand Songis abb1cd473b Fix some keys no sent to telemetry screens handler (#7263)
Fix some keys no sent to telemetry screens handler
2020-01-06 11:25:42 +01:00
Bertrand Songis 91ed2e51d2 Cosmetics 2020-01-04 21:36:05 +01:00
JakubandBertrand Songis 6e01552aa4 USB mode menu fixed for libui. (#7267) 2020-01-04 21:32:50 +01:00
Bertrand SongisandGitHub ef49a9ff77 Bsongis/wizard issue when model id already used (#7259)
Wizard: popup displayed when modelID already used, but screen not refreshed
2020-01-03 11:54:21 +01:00