Commit Graph
95 Commits
Author SHA1 Message Date
5622cb9c5c chore(color): Replace StaticText with LVGL labels on GVARS page (#3310)
* 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>
2023-03-26 19:10:56 +10:00
philmozandGitHub 044344f18f fix(build): Impove yaml generator libclang compatibility (from PR#2631) (#3402) 2023-03-26 19:06:15 +10:00
philmozandGitHub 4f5061438f fix(color): Some radio settings properties not triggering update of radio.yml (#3404) 2023-03-26 18:15:29 +10:00
philmozandGitHub fdf92b106e fix(cpn): Handling of 'Edge' logical switch V2/V3 parameters (#3322)
- Fix maximum allowed value for V3
- Update V3 displayed value when V2 changes.
2023-03-26 13:05:55 +10:00
d828ae8a56 fix(color): telemetry ID display when 'Ignore instances' is set (#3399)
Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
2023-03-24 14:49:06 +10:00
philmozandGitHub 8fc5a1c58e feat(color): Add LVGL scroll bar where needed (#3268)
* 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`
2023-03-24 11:37:21 +10:00
philmozandGitHub 5964b0b901 fix(color): Improve responsiveness of the model outputs tab while loading (#3361)
* Improve responsiveness of the outputs tab.

* Fix line height on portrait layout.
2023-03-23 20:36:30 +10:00
philmozandGitHub 623704f8b7 fix(cpn): Throttle initialisation after #3111 (#3394) 2023-03-23 11:40:35 +10:00
661657feca feat: New advanced joystick mode on radio, improvements to Companion and Simulator joystick support (#3111)
* 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>
2023-03-22 10:31:29 +10:00
philmozandGitHub fc1d6ba3a0 fix: Change mixer output value calculation to 'round away from 0' instead 'floor' (#3292) 2023-03-19 16:01:27 +10:00
philmozandGitHub 9a898533d1 fix(cpn): QoL tweaks to joystick preferences (#3105)
* 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).
2023-03-17 12:09:38 +10:00
philmozandGitHub a0fc3f2d88 fix(color): Adjust column sizes for largest LS 'Edge' V2 value (#3295)
* 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.
2023-03-17 10:37:04 +10:00
philmozandGitHub 667cc845f8 feat(color): Implement DISPLAY_TRIMS_CHANGE option (#3288)
* 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.
2023-03-14 13:08:28 +10:00
philmozandGitHub 8cdd756c0a fix(color): Only create a new model if the user actually selects a template (#3323)
Cancelling from the template select page will no longer create a blank model.
2023-03-14 12:41:34 +10:00
b258c3b92c fix(simu): checkValidMCU shouldn't be called when running simulator (#3347)
Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
2023-03-13 20:02:19 +10:00
philmozandGitHub 2ea804877f feat: Show available inputs when '+' button is tapped on the inputs page (#3332) 2023-03-13 11:51:03 +10:00
philmozandGitHub 340945584a fix: Make UI slightly more responsive when switching tabs (#3345) 2023-03-13 11:17:34 +10:00
philmozandGitHub 805b848ea6 fix(color): Adjust page padding for several setup pages, backlight page tweaks (#3291)
* 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.
2023-03-13 11:11:33 +10:00
philmozandGitHub 6e427615dd fix(cpn): Handling of the 'show splash' setting for B&W radios in Companion (#3336)
* Fix handling of the 'show splash' setting for B&W radios in Companion.

* Remove 'TODO' comment.
2023-03-13 11:05:12 +10:00
philmozandGitHub b88b4b66c1 feat(b&w): Show time on main and telemetry 128x64 screens (#3306)
* 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.
2023-03-10 11:26:25 +10:00
philmozandGitHub 42fb0eccf7 fix(color): Update of 'end' value for trainer channel (#3239)
Fix update of 'end' value in ChannelRange class.
2023-03-08 11:51:29 +10:00
philmozandGitHub bd1094fd13 fix(B&W): Fixes for inputs, mixes and curves screens (#3299)
* 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.
2023-03-08 10:54:20 +10:00
philmozandGitHub 54d0222c53 chore(color): LVGL update, translation strings for theme file carousel (#3278)
* Use StaticText instead of 'paint' function for 'loading' message in theme file carousel,
Add message strings to translation files.

* Update translation.

* Update translation.

* Update translation.

* Update translation.

* Update translation.

* Update translation.

* Update translation.
2023-03-07 11:58:06 +10:00
philmozandGitHub 8a7fb3fc4c fix(color): GVAR edit page not showing second title line on first load (#3311) 2023-03-07 11:14:06 +10:00
philmozandGitHub d098e45179 chore(color): Convert analog debug pages to lvgl (#3240)
* Convert analog debug pages to lvgl.

* Refactor classes.

* Cleanup
2023-03-05 21:28:31 +10:00
philmozandGitHub b8220e5be4 feat(color): Generate layout icon bitmap at runtime to account for screen orientation (#3282)
* 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.
2023-03-05 11:36:56 +10:00
philmozandGitHub 5b45b7ce2c chore(color): Add 'title2' to Page class to manage 2nd header title line (#3238) 2023-03-05 10:39:42 +10:00
philmozandGitHub ad46f1ca42 fix(translation): Missing comma in FR translation (#3270) 2023-02-27 14:28:34 +10:00
philmozandGitHub f81e140cf3 fix(color): LVGLify themes page and fix several possible string handling issues (#3135)
* 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.
2023-02-27 11:40:02 +10:00
philmozandGitHub 4ea77ee749 feat(cpn): Show splash screen after main window - resolves delay and position save issues on MacOS (#3210)
- Don't create splash objects unless needed
- Show main window before showing splash (fixes MacOS issues)
- Delay showing splash until app.exec() started (fixes MacOS issues)
2023-02-24 18:58:21 +10:00
philmozandGitHub 4fa666e680 fix(simulator): Telemetry checks not running due to inverted logic (#3246) 2023-02-23 13:42:10 +10:00
philmozandGitHub f76aea333e feat(color): Long press menu no longer restricted to active model on model select page (#3237)
* 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.
2023-02-22 21:53:49 +10:00
philmozandGitHub e637b534f3 fix(color): Rotary encoder behaviour on inputs, mixes and outputs pages (#3189) 2023-02-22 20:48:56 +10:00
philmozandGitHub 1df8fe86a8 fix(lua): Store and update the 'zone' rectangle for Lua widgets. (#3060)
* 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.
2023-02-20 11:46:27 +10:00
philmozandGitHub 00c38511cb feat(colorlcd): Improve trainer page layout, use Add/Replace instead of +=/:= (#3104)
* 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.
2023-02-13 20:30:52 +10:00
philmozandGitHub c3e22b8d7e fix(color): Use two rows for telemetry buttons when needed (#3183)
When translation text is long (CZ) or portrait screen, use two rows for buttons
2023-02-13 19:16:29 +10:00
philmozandGitHub 4e09bd7b8c chore(color): LVGLify custom mixer scripts page (#3071)
* LVGL flex conversion for custom mixer scripts.

* Adjust spacing for portrait layout and widest text value.
2023-02-05 11:31:32 +10:00
philmozandGitHub f6c6e77219 chore(color): LVGLify statistics and debug screens (#3072)
* LVGL flex conversion for statistics and debug pages.

* Replace empty text box with call to grid.nextCell().

* chore: Formatting
2023-02-03 20:45:03 +10:00
philmozandGitHub 41907f598b chore(color): LVGLify and enhance model -> telemetry page (#3070)
* 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.
2023-02-03 20:37:07 +10:00
philmozandGitHub fce96ffe1c chore: CN/TW translations for theme save and delete strings (#3129) 2023-02-02 13:22:21 +10:00
philmozandGitHub 291a95b32b fix(color): Overlap in logical switch monitor footer (#3137) 2023-02-02 13:06:24 +10:00
philmozandGitHub 7a1231753a feat(color): Change global variables layout to better match other pages (#3116)
* 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
2023-01-28 12:28:18 +10:00
philmozandGitHub e9b8a23ba4 feat(color): Convert theme save/delete dialogs to use ConfirmDialog popup (#3062)
* 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.
2023-01-28 10:48:23 +10:00
philmozandGitHub 7bbaa0909a fix(color) Flight mode name display in global variables overview off by one (#3115) 2023-01-28 10:20:35 +10:00
philmozandGitHub 3d2724c2c1 chore(color): LVGLify spectrum analyser footer (#3077)
* LVGL flex conversion for spectrum analyser footer.
Fix header title display for spectrum analyser.

* fix: `DEF` touch keyboard wasn't using freqDefault
2023-01-27 22:02:05 +10:00
philmozandGitHub 1dc422592d chore(color): LVGLify model template selection pages (#3076)
* LVGL flex conversion for model template selection pages.
* chore: Formatting
2023-01-27 21:44:25 +10:00
philmozandGitHub d53b94d14c feat(color): LVGLify and improve layout of theme details edit dialog (#3078) 2023-01-27 21:26:18 +10:00
d77389d30b feat(color): LVGLify and enhance Logical Switches page (#3019)
* 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>
2023-01-27 19:22:48 +10:00
philmozandGitHub 2e00f6aec8 fix(color): Make "Add New" curve handling work more like SF (#3103)
* Make new curve handling work like special functions & logical switches - show popup of available curve slots.

* chore: Formatting, comment typo
2023-01-27 16:00:47 +10:00
philmozandGitHub d6af2387ac fix(color): Curve preview layout in model input edit view (#3099) 2023-01-25 10:49:03 +10:00
475ad1fb6f feat(ui): Improved Button/touch handling for throttle / switch alert screen (#3061)
* 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>
2023-01-25 10:44:12 +10:00
philmozandGitHub 3d700f42f0 feat(color): Long press SYS on main screen for radio setup (#3092) 2023-01-25 10:19:56 +10:00
philmozandGitHub f7cdfdc2a9 fix(cpn): Joystick slider mappings (#3093) 2023-01-25 10:09:56 +10:00
philmozandGitHub ee208275f2 fix(color): Center align text in number input boxes for curve editor (#3094) 2023-01-24 18:17:07 +10:00
philmozandGitHub 820a924e4f feat(color): Add long press handler for new model curves page (#3091) 2023-01-24 11:33:40 +10:00
philmozandGitHub c2dff941d9 fix(color): Close menu popup on main view when switching to other views (#3090) 2023-01-24 11:11:11 +10:00
philmozandGitHub 80f3cbe759 fix(color): Prevent multiple instances of the main menu popup (#3067) 2023-01-24 11:05:45 +10:00
philmozandGitHub 2d534a88cb fix(color): Fix infinite loop/crash with some uses of POPUP_WARNING/POPUP_INFORMATION (#3068)
Prevent infinite loop and crash if POPUP_WARNING or POPUP_INFORMATION are used from within code that is called from a 'Menu' line button.
2023-01-24 10:57:28 +10:00
philmozandGitHub 4a23f04844 feat(color): New model curves page layout (#3041)
* 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.
2023-01-23 21:15:53 +10:00
philmozandGitHub 5503048e47 chore(color): LVGLify Special/Global Functions tabs (#2992)
* 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`
2023-01-23 20:48:27 +10:00
philmozandGitHub fd04f4a257 chore(color): Cleanup header title display logic (#3059)
Use 'Page' class 'header' property to display title where possible, instead of creating a new object.
2023-01-19 11:18:58 +10:00
philmozandGitHub fa4e6d795c fix(color): Update of Edge LS v1-part2 when v1-part1 when editing (#3049) 2023-01-17 15:11:01 +10:00
philmozandGitHub 7dc2f89917 fix(ui,cpn): Error in value conversion when loading LS data (#3026)
* 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.
2023-01-17 14:35:13 +10:00
philmozandGitHub 0610449c82 fix(color): Crash on inputs/mixes pages mixes/expos limit reached (#2985) 2023-01-17 13:28:53 +10:00
philmozandGitHub 60ef3a545d fix(cpn): Delete old models from radio before saving new models (#3020)
* Delete model files from radio before saving them from Companion.

* Update comments. Show error if file delete fails.
2023-01-17 13:05:33 +10:00
philmozandGitHub dca52c4ae5 fix(color): Update top bar date & time when in setup pages (#3037) 2023-01-15 12:06:18 +10:00
philmozandGitHub cb9f411036 fix(color): Invalid custom curves + layout updates (#2973)
* 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.
2023-01-15 11:23:40 +10:00
philmozandGitHub dd8ab3037f fix(ui): Adjust model setup button layout to better fit portrait screen (#2956)
* 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.
2023-01-15 10:40:40 +10:00
philmozandGitHub 1bffd260a0 fix(lua): Add missing switch and countdownStart properties (#2979)
Add the switch and countdownStart properties to the getTimer and setTimer Lua functions.
2023-01-08 11:02:55 +10:00
philmozandGitHub e1a8066707 fix(color): Add missed translations in TW (#2971)
`TR_MODEL_QUICK_SELECT` and `TR_LOADING`
Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
2023-01-02 10:55:38 +10:00
philmozandGitHub 655aa42c6f fix(color): More consistent button colors, GV buttons checked/pressed (#2944)
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.
2023-01-01 11:30:12 +10:00
philmozandGitHub 943b1e7cd0 fix(color): Fix single widget layout size, improve code readability (#2962) 2023-01-01 11:11:59 +10:00
277c1cae37 fix(color): Clear Lua lcd buffer and display 'Loading...' (#2916)
* Clear LCD buffer before use for standalone Lua scripts.

* Fix rebase merge issues.

* Add translation.

* Add translation.

* Add translations.

* Add translation/

Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
2022-12-28 10:15:10 +10:00
philmozandGitHub 919b83af42 fix(ui): Ignore hidden file when iterating SD card contents (#2925)
* Ignore hidden file when iterating SD card contents.

* Fix compile error.
2022-12-23 11:18:00 +10:00
philmozandGitHub f8f2258a79 fix(ui): Update flight mode color on startup/theme edited/theme changed (#2928) 2022-12-23 11:08:22 +10:00
philmozandGitHub 3f08af6120 feat(color): Quick Model Select, keep active model in view when changing labels (#2895)
* 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.
2022-12-23 09:58:49 +10:00
philmozandGitHub 8eb55452a5 fix(color): Display of model notes when selecting model (#2922)
* Fix display of model notes when selecting model.
Fixes issues 2722 and 2921.

* Move view close code as suggested by @pfeerick.
2022-12-22 19:01:29 +10:00
philmozandGitHub da5d056257 feat(ui): Improvements to color picker (#2909)
* 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.
2022-12-22 18:47:26 +10:00
philmozandGitHub 866716b708 fix(color): File handle leak in theme manager (#2911) 2022-12-20 21:52:16 +10:00
philmozandGitHub af040c9e2e fix(cpn): Ignore 'Quit' event in main window on MacOS if simulator running (#2874)
Prevents app crashing on exit while the simulator is open.
2022-12-20 21:15:35 +10:00
philmozandGitHub 4841f0673c fix(ui): 'Add trims to subtrims' btn on the Outputs page wasn't updating display 2022-12-20 20:56:12 +10:00
philmozandGitHub 2133d42bd2 fix(cpn): Size of the YamlStickConfig struct was set wrong (#2891)
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.
2022-12-20 08:59:55 +10:00
philmozandGitHub 37779a5aaf feat(ui): Change dialog background color to make buttons more visible (#2903)
* 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.
2022-12-20 08:52:12 +10:00
philmozandGitHub 2206506c82 fix(color): Increase menu max height on landscape screens for better fit (#2896) 2022-12-19 19:10:05 +10:00
philmozandGitHub 73e240f365 feat(color): Natural number sort order for SD card file browser (#2870) 2022-12-18 14:59:13 +10:00
philmozandGitHub 0be85bbad1 fix(color): Restrict time/date to valid values, check for changed values before updating screen (#2884)
* 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.
2022-12-18 14:40:31 +10:00
philmozandGitHub a1c55a5b02 chore: Cleanup some compiler warnings (#2864) 2022-12-16 10:24:28 +10:00
philmozandGitHub 2c47d5440c fix(ui): Tweak mixer overview layout for long names (#2851)
* Fix Mixer layout on color lcd screen to accommodate long input names.
* Adjust layout for portrait orientation.
2022-12-14 19:33:16 +10:00
philmozandGitHub 650406db52 fix(color): EM triggered when checking if modelID unique in certain instances (#2845)
Cast comparison value to int to avoid signed / unsigned comparison error if (curr - warn_buf) > 48.
2022-12-14 19:18:34 +10:00
c505f9eb01 fix(sim): Fix for 2POS switch logic affected by 6POS switch change (#2860)
* 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>
2022-12-14 18:57:01 +10:00
philmozandGitHub 1b0dab9d84 feat(sim): Forced style for POT/6POS knobs on MacOS for legibility (#2840) 2022-12-11 11:43:37 +10:00
b77bdba9a1 feat(cpn): Force light mode UI on MacOS for legibility (#2839)
Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
2022-12-11 11:43:06 +10:00
a8bdf0c269 fix(cpn): Not saving on MacOS unless .etx in filename (#2830)
MacOS companion does not save models if ".etx" extension not in filename.

Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
2022-12-11 11:42:09 +10:00
f67b3257c1 fix(sim): Consistent steps for 6POS (#2831)
* 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>
2022-12-11 10:43:09 +10:00
philmozandGitHub d4cd3d0ddf fix(color): Fix top bar timer widget names sometimes having garbage characters (#2835)
Limit length of name text drawn in small size timer widget to prevent random characters appearing
2022-12-10 15:48:36 +10:00