* Allow switches on the connected radio to control switches in the simulator via the joystick interface.
* Merge configurable radio joystick interface from banyaszg.
* Add two more 'axis' channels to companion.
* Fix 6POS from USB joystick to simulator.
* Reduce data size.
* Fix build error on B&W radios.
* Add 'Companion' button mode to work with the button logic in the Companion app.
* Build Companion joystick setup layout at runtime.
Change #define names for simulator joystick.
Allow 15 axes and 32 buttons.
Initial support for trim sliders.
* Remove custom joystick button type for companion - use 3 buttons per switch in companion to control simulator switch state.
* Fix joystick constructor calls parameters. Connect some radio joystick trims to simulator widgets.
* Restore 'companion' button type to reduce number of buttons needed. Make trims work via buttons in USB joystick.
* Connect joystick trim buttons to simulator widgets.
* Use companion source names for trims.
* Add encode / decode of usb joystick custom settings to Companion.
* Convert to lvgl layouts.
Update language files.
* Fix generated YAML storage files.
* Fix initialisation error when editing button channel. Cleanup code.
* Fix rebase.
* Fix refresh of joystick channel list view after editing an entry.
Companion joystick config window uses two columns.
* Fix vertical joystick inversion bug.
Change stick axis labels.
---------
Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
* 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
* WiP: new module interface
* WiP: softserial timer DMA
* WiP: setup() and send() in one step
and remove methods specific to internal or external module
* fixes and extra port config
* horus targets
* module ports have moved
* T8 support (only internal module)
* fix nv14
* stupid GCC....
* disable BT
* remove nv14 telem driver
* remove old aux serial driver
* Move module buffers out of pulses.h
* Soft serial fixes and PXX1 support
* Fixed PPM module output
* Fixed CLI
* compilation fixes
* Ported bluetooth and flysky gimbal to new serial driver
* Re-enable soft-serial RX
* fixes and cleanup
* nv14 fixes
* Fix flysky gimbals
* Ghost module
* 16 bytes of RAM
* Remove getByte from module API
* Ghost cleanup
* fix: _half_duplex_input() must be called after usart init
* WiP
* more cleanup
* Remove board specific settings from PXX1 / PXX2 drivers
* A bit of PXX2 header cleanup
* Add support for OVER8 and ONEBIT
* Add some support for inverters (NV14 / EL18)
* Support NV14 power fixes in generic board
* Fix polarity handling
* Fix RX DMA
* Fix mixer not running
* Add soft-serial polarity control
* Quick fix for telemetry polling while module port is changed
* Fix bootloader DEBUG
* Fix MPM telemetry
* Fix pulse start
* DSM2 soft-serial fallback
* DSMP async module restart
* Fix CRSF LUA upstream
* Remove global variable telemetryProtocol
* Use HAL/LL constants
* Fix various issue with AFHDS3 and NV14/EL18 internal module
* Fixed S.PORT unit tests
* fix: update widx after writing at current index
* fix: init error condition
* Fix: possible infinite loop in _find_port()
* Add support for bidir S.PORT init
* Add support for "getLastByte" in HW serial driver
* PXX1: Add support for S.PORT based on IDLE callback
* Fix rebase error
* Fix softserial _rx_fifo_push()
* Add softserial support for waitForTxCompleted()
* Fix MPM flashing (internal / external)
* Fixed external MPM
* Activate RX DMA on internal module
Seems to work with serial passthrough without issues, at least on the L3R PRO.
* Fix softserial DMA on stdlcd F4 targets
* Add softserial support for 32bit timers (mostly TIM2)
* More precise soft-serial
* Fix MPM update using inverters & HW uart
* Raise S.PORT DMA/USART IRQ prio to achieve faster switching to input
* Remove useless delays
* Fix flashing external ELRS module
* Added a retry mechanism for FrSky S.PORT update
* Remove useless enableRx()
* External FrSky modules are all flashed via S.PORT
* Remove power management unit update
This was only used on the first batch of X-lite.
* migrated stack diagnostics (available, free) to using built in FreeRTOS builtin function
Note: main stack must be and is treated differently as it is not under FreeRTOS control. main stack is painted by the STM32 startup routine. free main stack is calculated checking the remaining painted stack area.
* corrected my merge error
* missed a blank
Use `-DSPACEMOUSE=YES` CMake option to activate on Horus color targets.
Co-authored-by: Niel Horne (elecpower), Raphael Coeffic (raphaelcoeffic) and Peter Feerick (pfeerick).
* First build
* Fix X9
* Update api_general.cpp
* Update translations.h
* clean up translations
* fix: B&W option handling, remove magic numbers, cleanup
- Remove references to invertRotary, change to RotEncDir or similar
- Add compatabilty importing to companion, firmware
- Rename Lua API call
- Move magic numbers to enum
- Improve B&W option handling so it doesn't apply changes while in menu
* chore: yaml regen
* fix: Add missing guards for X9D/X9D+
* fix: Wrong enum name in simu
* fix(cpn): Use correct names for UI elements
* fix: Translations
* fix: Allow `rotEncMode` in all yaml due to x9d var
Of the three X9D variants, the X9D+2019 is the only one that
has a rotary encoder as standard. However, as the base config
file is for the X9D, this meant it wasn't reading or writing the
config value. Rather than add a seperate config file for it for
a single variable, simple to just allow it across all targets.
* fix: Companion string, change colorlcd to `Choice`
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
- Plays "Minimum/Maximum trim reached" audio every when trim limit reached and when repeatedly pressed
- Partially fixes issue where extended trims were not being reset when option changed
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>