2. change order of initialization. Lvgl has to be before ViewMain
3. Basic support for layers, but they are still broken when Menu's are used
4. Register input driver in lvglwrapper
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
Imported from open-flysky/Flysky-OpenTX-Test-Branch
* companion: Don't nuke `stickDeadZone` setting
* Implement data storage properly
* Add missing check for NV14 storage struct sizes
* Formatting
* Use one less byte in the packed data struct
Thanks @raphaelcoeffic :)
* Move setting of stickDeadZone default
* Use a Choice combo rather than NumberEdit
* Good riddance magic number
* Also set default stick zone if setting is missing
* Teach tests about `STICK_DEAD_ZONE`
* Tweak choice width
* Cpn NV14 add stick dead zone to hardware and section labels
* Cpn NV14 align default pot names to radio
Co-authored-by: elecpower <neilh713@tpg.com.au>
* Clean up some errors introduced in PR #1363
- Cleaning up bad YAML definitions
- Reverted renaming of 'jitterfilter' radio setting in storage/conversions/yaml/ files
* Add a custom attribute to allow for backward compatibility
* Prevent custom attributes without a 'write' function to output a tag
* companion - read but don't write old name
Co-authored-by: Raphael Coeffic <raphael.coeffic@frafos.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
* replace magic number for throttle idle with correct define
* settings for custom throttle warning position
* settings fixed not to break byte-aligment of bit-fields
* evaluate custom throttle warning position
* add requested throttle value to warning text
* comment about field alignment in ModelData struct
* Menu for editing custom throttle warning for 128x64 radios
Tested on RM TX12
* Improoved menu display
* move displayed strings to translation
* translation template added for each language
* support for 212x64 B&W radios
* menu for colorlcd
not tested
* corrected translation entry for TW
* corrected handling of padding bits in ModelData structure
* Companion support for custom throttle warning position
* Rebase catchup
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
* ADC Filter - On/off state configurable at the model level
* Updated YAML configuration to match change from ADC Filter feature commit
* Companion changes to support ADC jitter filter to be a model configuration item.
* Renamed jitterFilter field to noJitterFilter.
This better describes the semantic, which is inverted.
* Updated after review
* Re-run generate-yaml
* Changed ADC Jitter filter control on Model to be tri state.
Off, On or use the radio setting
* Adde NOBACKUP() to the added field
* Re-generate yaml_datastructs
* Making the default state to use radio setting/Global value
* Updated after review:
Changing to more consistent naming across firmware and companion.
* Reverted files that was accidently added to the commit.
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
* Warn on connected model (#1466)
* Make it so not confirming aborts model change
* add delay before accepting disconnected telemtry
* Add power off delay
* Remove whitespace + time unit in name
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
* Show true unscaled and unfiltered analogs for diagnose purpose on the analog diagnose screen.
Tested on physical RM TX16S, not yet tested on B/W targets.
* Changed to decimal display also on B/W targets. Tested now with RM Zorro as well.
* 5 fps refresh rate of the raw analog values. Much nicer to look at.
* Time-changing 3 views for color radios: std., filtered raw with deviation, unfiltered raw.
* Corrected deviation view output to not use old values.
* Changed analogs diagnose page to user navigatable TabsGroup with 3 tabs.
* Added fourth analog diagnose tab to show minimum and maximum values and the range (difference between min and max).
Left touch screen and IMU output tests only on first page (should also move in the future to their respective dedicated pages).
* Use Std. JitterAlpha filtering for Deviation screen to minimize delay, omit filtering for FlySky digital hall gimbals - not necessary, the signal is stable enough.
* 2 analog diagnose pages for 128x64 B/W radios: calibrated analogs and raw values with display output limited to 5 frames-per-second due to visibility reasons.
* Added 2 analogs diagnose pages also for 212x64 display B/W radios.
I was only able to simulate it, not tested on real hardware.
* Support also radios that do not have PageUp/PageDn keys, but only Page key (e.g. X7).
* Better key handling and improved style thx to @pfeerick
* always have aat least a 5s backlight timeout and some backlight enabled when backlightshould be on on color lcd radios
* for backlight timeout to be at least 5s on color lcd radios under all circumstances
* fix indentation
* the backlight value is inverted on color lcd radios, so the calculation was wrong
* fix typos
* Stuck key test for COLORLCD #1271
* always start with the first button, no matter what this button is.
* Add LED error
* Move LED_ERROR_END to ensure runs after dlg close
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
Added special UART4 init to sample if FlySky sticks are present or not.
Added boolean globalData.flyskygimbals to save the detection result.
Removed FLYSKY_HALL_STICKS and FLYSKY_HALL_STICKS_REVERSE CMake build options.
Tested on two RM TX16S radios, one with FlySky digital hall sticks and second with stock analog sticks.
* no more backlight off mode for color lcd radios
disable backlight input controls in radio setup screen, when they are not used by the selected backlight mode
force backlight on to be at least the brightness of backlight off
* do not allow to set the display brightness below the configured off brightness, except when display mode is set to ON.
* Revert "do not allow to set the display brightness below the configured off brightness, except when display mode is set to ON."
This reverts commit e153a8dc658d53f5420c912e7543d6d0a9fe6ed9.
* Trying to align LUA options with radio/src/CMakeLists.txt
-DLUA=NO: no Lua of any kind
-DLUA=ON: everything but mixer scripts
-DLUA=YES: also mixer scripts
* Color LCD with -DLUA=NO is probably a rare combination, so it needed a little help with #defines.
* Some strange error using floor function w/o <math> - probably because -DLUA=NO is not normally used w/ color.
This has the added benefit of precision increase and also avoiding unnecessary computation. Needed to change to uint32_t, as the jitter removal computation would otherwise go over the 16-bit range. As 16-bit computation can be left for "normal" sticks, added a special define just for FLYSKY_HALL_STICKS.
In addition this PR changes back the radio analogs diagnose page second column also for FlySky digital hall sticks to show +/- 100 again, as now with first and second column we already cover all internal ranges used.
Tested on RM TX16S with FlySky digital hall sticks.
Before write access is permitted to numerous DMA registers, need to make sure that DMA is disabled for the stream. Disabling the stream is not instantaneous, and needs to be waited for (previous transmissions need to be finished first).
Added return values to numerous functions to signal a failure.