* chore(ui): speedup gvars page
* Replace StaticText with LVGL labels.
* Further performance improvements.
* Remove diagnostics.
* Fix portrait layout.
* Refactor style to a separate class and use CHECKED state to control color of selected flight mode.
* Remove duplicate lines.
* User LVGL state and style for GV value font size selection.
Reduce the number of times the style_refresh state is changed.
* Center align name without needing hard wired offsets.
* Speed up page build time.
* chore: Bump libopenui
gagarinlg chore(ui): improve static text and window base speed (#88)
---------
Co-authored-by: gagarinlg <malte@langermann.net>
* Add scroll bar to radio settings/config pages.
* Add scroll bar to mode settings/config pages and screen settings pages.
* For pages display via TabsGroup class. move the scroll bar setting to the 'body' window.
* Fix position of new line on Inputs and Mixes pages.
* chore: Bump `libopenui`
* 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>
* Add preference option to Companion to disable the 'Cannot open joystick, joystick disabled' popup warning when starting the simulator.
* Don't erase joystick settings if user opens preferences dialog while joystick is not connected.
Remove reference to "Ubuntu" font family for 'Radio Type' label in preferences dialog (generates warning on MacOS).
* Adjust the column sizes for the logical switches in the lust view and the channel monitor footer to fit largest V2 value for 'Edge' function.
* Cleanup code.
* Implement DISPLAY_TRIMS_CHANGE option for color LCD trim widget.
Refactor code.
* Change data type to prevent build tests failing.
* Display trim value to the side like B&W radios.
* Add padding to 'Trims' and 'Throttle' setup pages.
* Add padding to pre-flight checks page.
Make button size consistent.
Fit more buttons per row,
Display proper pot and slider names for center beeps.
* Add padding to radio setup pages (Sound, Vario, Haptic, Alarm, Backlight and GPS).
Move backlight inactivity timer to its own line and add a label (requires translation).
* Update translation.
* Hide Backlight controls that are not relevant to the backlight mode selected.
* Update translation.
* Update translation.
* Update translation.
* Update translation.
* Update translation.
* Display time on main screen and telemetry for B&W radios.
Fix position for timer0 display on telemetry screen (was off screen).
* Put the time between the trim bars.
Center the stick boxes and the pot/slider bars.
* Remove code for unsupported radios.
* Fixes for B&W radio UI screens.
* Fix curve display to fit new size. Adjust curve for better horizontal symmetry. Adjust position crosshair to better fit curve line.
* Simplify layouts code, use data driven layout definition.
Generate icon bitmap at runtime to account for screen orientation.
Move old layout png images to companion folder (still used in companion).
* Align buffer for bitmap.
* Use 'free' instead 'delete' for bitmap buffer to avoid failed build test.
* Convert theme select, theme edit and color edit pages to LVGL flex.
Add 'Edit Color' string to language files (requires translations).
Simplify theme edit 'onCancel' logic.
Fix size of buttons in ConfirmDialog for portrait layout.
Truncate item strings in ListBox to fit available space.
Set window background color on Page and TabsGroup classes instead of using 'paint' function.
Replace strncpy and strncat with strAppend - avoid possible unterminated strings and string overrun.
Truncate display of long name and author strings in theme pages.
* Revert code to truncate ListBox entry strings as it causes other issues.
* Adjust layout for theme color editor to fit large hex string size.
* Remove unnecessary copying of the ThemeFile object being edited.
Refresh TabsGroup page background color when theme changes.
* Set selected theme in list on long press as well as short press.
Comment out unused 'title' in ListBox.
* Handle default theme like custom themes on SD card:
- show logo when selecting theme
- support background_WxH.png names for background images
Use f_stat( via isFileAvailable) instead of opening and closing files to check for existence.
* Remove debug print.
* Fix rebase.
* Update long press handler on model select page.
Long press (via touch) on any model will select it and open the menu.
* Open menu for model just selected on long touch press.
* Store 'zone' rectangle dat in Lua registry and update it when the screen layout changes or full screen mode changes. Allows Lua widgets to adjust to layout changes.
* Call widget 'update' function is layout has changed.
* Adjust trainer setup layout to better use space and avoid scrolling.
* Adjust padding for landscape layout.
* Change text for trainer mode to 'Add' and 'Replace' instead of '+=' and ':='. Adjust layout to fit. Copy translations from TR_VMLTPX strings.
* LVGL conversion for telemetry.
* Move RSSI section after Sensors section.
* Replace empty text box with call to grid.nextCell(). Center 'fresh' data indicator vertically.
* Fix build error after rebase.
* Change global variables layout to better match other pages.
* Move internal classes for global variable page from .h to .cpp file. Convert header text in edit page to StaticText object and remove 'paint' function.
* Fix build error.
* chore: Formatting
* Convert theme save and delete dialogs to use ConfirmDialog popup instead of full screen alert.
Add strings for translation.
* Update translations.
* Update translations.
* Update translations.
* CZ translation
* chore: Formatting
* Call 'cancelHandler' if RTN button used to exit ConfirmDialog.
* Possible fix for 'save theme' dialog not working in the theme editor.
* Update logical switch layout:
- Use LVGL flex / grid layout
- Same height for all buttons
- Display logical switch name inside button so entire row acts as button
- Consistent press handler for buttons (always show popup menu)
- Group buttons for empty switch in lines to utilise space
- Remember selected button and reselect after edit.
* Fix incorrect switch being selected when changing tabs.
* Fix selection of focussed button when using 'Clear', and switching tabs.
* Reorganise logical switch edit code.
* Change button style to match input/mixes/outputs pages.
* Single line overview on landscape LCD layout. Convert to using grid and lgvl objects for overview buttons.
* Remove redundant flag.
* Remove logic that tries to center scroll around selected button (not working).
* Remove empty buttons and add a single '+' button at the bottom to match inputs and mixes.
* Remove unused code.
* Correct string usage.
* Add long press handler for quick access to the '+' button functions.
* Display logical switch operation and parameters as an expression. Add 's' suffix to time values.
* Adjust spacing.
* Set V2 number edit control to automatically resize and fit content to prevent clipping of large values.
* Revert to fixed column layout.
* Adjust grid spacing.
* Convert the logical switch view in the channel monitor to LVGL flex.
* chore: Formatting
Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
* Button and touch handling for throttle / switch alert screen.
* Restore original touch behaviour for confirmation dialog.
* Add buttons for 'actions' at bottom of screen.
* Fix infinite loop that can happen in some instances.
* Remove the option for a long press on the touch screen to close the dialog. On screen buttons must be used to close.
Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
* New curve page layout.
* Set scroll to selected curve.
* Cleanup.
* Add #define's for sizing. Show both curve number and name in title bar (if name is set).
* Remove unnecessary call to CurveEdit::SetCurrentSource. Use runtime size for layout where possible.
* Add comments
* Fix base layout position.
* Fix issue with button selection not working properly with scroll wheel.
* Convert Special / Global function page to flex layout.
Move function name text into row button so entire row acts as a button.
Display active functions first, then inactive functions as smaller buttons in a grid.
* Merge duplicate cases in switch, fix indentation.
* Keep selected button focussed after editing a function.
Add long press handler to jump between free and used functions.
* Revert to numerical order for functions list.
Use context menu for empty functions all the time.
* Fix parameter type and remove redundant lines.
* Fix incorrect function being selected when changing tabs.
* Fix selection of focussed button when using 'Clear', 'Delete' and switching tabs.
* Change button style to match input/mixes/outputs pages.
* Fix checked state display for buttons.
* Fix scroll position when adding new entries at the bottom. Center selected button after editing or changes to list.
* Remove logic that tries to center scroll around selected button (not working).
* Convert overview button to lvgl grid.
Display function as more readable expression instead of discrete values.
Single line display for overview button on landscape screen.
Fix display when editing GVAR INC/DEC value (was '--' instead of '-=').
Fix incorrect module displayed for 'Set Failsafe' (swapped).
Show all parameter and values for each function type in overview.
* Fix 'Enabled' indicator so it is not selectable with the scroll wheel and looks less like a radio button.
* Remove empty buttons and add a single '+' button at the bottom to match inputs and mixes.
* Add long press handler for quick access to the '+' button functions.
* Ensure addButton is initialised if not needed (list is full).
* Use formatNumberAsString helper function.
* Adjust grid spacing.
* fix: `STR_VALUE` not `STR_VOLUME`
* Fix error in value conversion when loading logical switch data from YAML files (for 'Edge' and 'Timer' functions).
* Remove debug print.
* Fix handling of telemetry sensors in Companion.
* Layout updates and bug fixes for curve editor.
- Fix issue 2972 where an invalid curve could be created
- Use vertical layout or list of points
- Add border to preview to better show end points
- Fix issue where preview was redrawn very frequently
- Better organisation of curve edit classes
* Fix to refresh curve preview on input edit page when parameters changed.
* Adjust model setup layout to better fix on portrait LCD screen.
* Set buttons to fixed width and allow to grow vertically to fit text.
* Cleanup layout logic - buttons stretched horizontally, centered vertically.
Make ButtonMatrix button text color behave like TextButton for flight modes and pre-flight checks.
Show 'GV' button as checked if corresponding input value is a global var.
* Fix rebase merge issue.
* Incorporate solution from @ParkerEde in PR #2626
* Fix selection logic for models.
* Select model on first press.
* Fix quick model selection when using scroll wheel & enter button.
Add setting to enable quick model selection.
* German translation.
* Fix behaviour when 'model quick select' is off to work like existing 2.8 logic.
* Add translations.
* Prioritise active model as selected model when the set of visible models changes.
* Fix selection ordering when using scroll wheel.
Minor code cleanup.
* Revised color picker:
- add title to popup window
- add Save and Cancel buttons
- Source value only updated when 'Save'' button pressed
- Add editor to select from system theme colors
* Center 'Cancel' and 'Save' buttons, make them both the same size and fill available space.
Reduce width of dialog box on portrait screens.
The YamlStickConfig definition was defined and sized with CPN_MAX_SWITCHES (32) instead of CPN_MAX_STICKS (4).
When loading radio.yml this would overwrite 112 bytes past the end of the stickName array in the GeneralSettings class.
* Change background colour of the ConfirmDialog box to make the buttons more visible.
* Change background colour of the ColorEditorPopup box to make the buttons more visible.
* Fix RTC date editing to limit day max value to actual number of days in the selected month.
If month or year is updated check that day value is still in range, if not update day to max value for selected year and month.
Only update UI values that have actually changed.
* Use struct assignment instead of memcpy to initialise property.
* Fix 2POS switch logic in simulator. Recent change for 6POS switch broke the 2POS switches.
* Rework switch and pot controls in the simulator ensure consistent values, avoid extraneous events in Qt and, hopefully, simplify the code.
Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
* Fix for issue #2827.
Ensure consistent values for the TX16, 6 position switch, in the simulator.
* Adjust 'value' to achieve alignment of raw values to step positions.
Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>