Skip to content

feat(bw): allow user setting of SA & SD Led colors on GX12 #6053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from

Conversation

philmoz
Copy link
Collaborator

@philmoz philmoz commented Apr 4, 2025

Planned to be superseded by #6095

Add the ability for users to set the Led colors of the SA and SD switches on the GX12.

screenshot_gx12_25-04-05_09-29-05

screenshot_gx12_25-04-05_09-29-10

Todo:

  • Companion support

@philmoz philmoz added UX-UI Related to user experience (UX) or user interface (UI) behaviour B&W Related generally to black and white LCD radios labels Apr 4, 2025
@pfeerick pfeerick added this to the 2.11.1 milestone Apr 4, 2025
@3djc
Copy link
Collaborator

3djc commented Apr 5, 2025

That's certainly something that will make user happy. Ultimately, those (sa/sd) really should be part of customizable switches, looks like we are repeating a crippled down version of those. Would if be better in the long run to allow (dev) reordering of switches list ?

@philmoz
Copy link
Collaborator Author

philmoz commented Apr 5, 2025

I can change it to be model level colors and put the UI in the CS section. I don’t think they should take part in groups though.

@3djc
Copy link
Collaborator

3djc commented Apr 5, 2025

Interested in why you think that they should not be part of customizable switches ? SA is in essence no different from SW1 on gx12, and it would open great possibility to have customizable switches out of the traditional "6pos".

The most obvious benefit is you could have SA/SD part of a customizable switch group where one could become "arm" and another one "unarm" or things like that

@gagarinlg
Copy link
Member

Because, from a UI perspective, they are completely independent from the buttons in the middle of the radio.
And to keep the configuration manageable for the majority of users.

@3djc
Copy link
Collaborator

3djc commented Apr 5, 2025

I still think there would be a lot to be gained from more switches in customizable one. Default config could be exactly as it works now, no user would be troubled by that, and they could learn about the real different possibilities of customizable switches

@philmoz
Copy link
Collaborator Author

philmoz commented Apr 5, 2025

That would also mean that the switch name and type for SA and SD would move from the radio settings to the model settings. Potentially breaking existing setups.

It would also complicate the switch code - need special case logic everywhere since the name / type are stored differently to other switches.

@pfeerick
Copy link
Member

pfeerick commented Apr 5, 2025

IMO it should first and foremost be treated like the ADC filter, model level settings, etc... global setting first, then model level. So if you have not configured it at the model level, the default global settings would take effect, thus no configuration breakage can occur.

I know this makes it complex, but it gives the most flexibility of configuration for the end user... if they want it. If you don't, you never change the model level settings, and it behaves just like any other switch. And if you do want it to be, it should be groupable, but this would be done at the model level.

I would propose the following. It would be configured at the radio / hardware level, both switch type and colours. When you go to customisable switches, you will see it configured as "global" (for want of a better term). You can override the type and colour, and even group it. Once you do, if you go back into radio / hardware it would be marked as "model" (or something better?) and unconfigurable there. Now, the switches/sources lists gets a bit weird. If globally configured, it needs to go where it belongs by name, like a normal switch. But as soon as you override at the model level, it is formally a customisable switch, so can be grouped there.

Clear as mud?

@philmoz
Copy link
Collaborator Author

philmoz commented Apr 5, 2025

That would be very complex and require a lot of other changes.

I think there are two options:

  • radio settings like I've done here and keep SA & SD as switches
  • make SA & SD customisable function switches instead. So they only show in the model settings and are removed from radio settings. The GX12 will then have 8 customisable switches two of which have different default names.

The second option will potentially break existing setups; but give users more flexible switches.

@3djc
Copy link
Collaborator

3djc commented Apr 5, 2025

I intended to have them as customizable switches, but did not do it by lack of time before radio production was started: it needs a way to re-order switches, as user (rightfully) expect SA before SB, not before SW1 or after SW6

@philmoz
Copy link
Collaborator Author

philmoz commented Apr 5, 2025

I intended to have them as customizable switches, but did not do it by lack of time before radio production was started: it needs a way to re-order switches, as user (rightfully) expect SA before SB, not before SW1 or after SW6

That looks like it will require pretty substantial changes to all the switch handling logic.

@philmoz
Copy link
Collaborator Author

philmoz commented Apr 7, 2025

Can I suggest, as a first step, these changes:

  • Set the SA / SD colors per model instead of radio settings
  • Store the SA / SD colors in the same array as used by the custom function switches
  • Move the SA / SD color setting UI into the customisable switches section in model settings

At least this way the color settings are in the right place, and in future we can look at expanding it so SA / SD work like the other customisable switches.

@3djc
Copy link
Collaborator

3djc commented Apr 8, 2025

Sure. Large changes to the way we parse switches should anyway be reserved to major version

@philmoz
Copy link
Collaborator Author

philmoz commented Apr 9, 2025

I've moved the color storage and editing to the model.
Also added basic (read/write) support to companion (same as custom switches).

@philmoz philmoz force-pushed the philmoz/gx12-switch-colors branch from 0ee2c03 to f503f59 Compare April 10, 2025 03:05
@philmoz philmoz marked this pull request as draft April 11, 2025 06:44
@philmoz
Copy link
Collaborator Author

philmoz commented Apr 11, 2025

Changed to draft.
It might just be better to do a full unification of the switches, otherwise there will be even more to clean up if this gets merged.

@pfeerick
Copy link
Member

pfeerick commented Apr 11, 2025 via email

@philmoz
Copy link
Collaborator Author

philmoz commented May 8, 2025

Superseded by #6095

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B&W Related generally to black and white LCD radios UX-UI Related to user experience (UX) or user interface (UI) behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants