Skip to content
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

fix(radio): enforce rules for custom switches when setting up in the UI. #4994

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

philmoz
Copy link
Collaborator

@philmoz philmoz commented May 12, 2024

Fixes #4990

Changes to the UI for setting up custom function switches to prevent invalid setup.

@3djc
Copy link
Collaborator

3djc commented May 12, 2024

Overall very nice (i realize this is WIP)

  • I think we can hide Groups that have no switches in them
  • There is a functional issue, where selecting a switch for the group doesn't delete the '=' for other switch in group
  • I think most, if not all, of the functions in model_setup should move to a common place, like switches.cpp

I will wait for that change to be merged to address #4989, since both need similar functions added

@philmoz
Copy link
Collaborator Author

philmoz commented May 12, 2024

  • I think we can hide Groups that have no switches in them

Done.

  • There is a functional issue, where selecting a switch for the group doesn't delete the '=' for other switch in group

I think this is fixed now.

  • I think most, if not all, of the functions in model_setup should move to a common place, like switches.cpp

Moved the ones that aren't UI specific.

I've also renamed FS_START_UP to FS_START_ON and FS_START_DOWN to FS_START_OFF to avoid confusion and because the previous names were backwards. E.G. if you use one of the custom switches in a SF then the ON state shows as SW DOWN, not UP which is consistent with usage for normal switches.

@3djc
Copy link
Collaborator

3djc commented May 13, 2024

Perfect !

@philmoz
Copy link
Collaborator Author

philmoz commented May 14, 2024

For completeness, I've added an option to set the startup state of a group to 'Off'.
This will force the group to be all off on startup.
Only applies to groups that are not set to always on.

@3djc
Copy link
Collaborator

3djc commented May 14, 2024

Successfully tested on T20V2

@philmoz
Copy link
Collaborator Author

philmoz commented May 14, 2024

Changed the diag page to use arrows and OFF/ON labels.

screen-2024-05-14-223649

@elecpower
Copy link
Collaborator

Screenshot from 2024-05-17 13-17-40

Add space character between Group and number ie Group1 -> Group 1 for labels and drop down lists

Would it not be more appropriate for the 'Start Switch' label to be 'Start' as the option per group is not always a switch eg Restore or Off

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quirks in behaviour of customisable function switches.
4 participants