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

Quirks in behaviour of customisable function switches. #4990

Open
1 task done
philmoz opened this issue May 11, 2024 · 6 comments · May be fixed by #4994
Open
1 task done

Quirks in behaviour of customisable function switches. #4990

philmoz opened this issue May 11, 2024 · 6 comments · May be fixed by #4994
Assignees
Labels
bug 🪲 Something isn't working triage Bug report awaiting review / sorting

Comments

@philmoz
Copy link
Collaborator

philmoz commented May 11, 2024

Is there an existing issue for this problem?

  • I have searched the existing issues

What part of EdgeTX is the focus of this bug?

Transmitter firmware

Current Behavior

There are some oddities in the way the customisable switches behave (tested on T20V2).

My understanding is that a switch group should follow the following rules.

  • only zero or one of the switches in the group can be on at any given time
  • if the group is set to always on, then one of the switches must be on

Issues:

  • When a switch group is changed to always on, the radio does not enforce the rules so the group could have 0 or more than one switch turned on depending on the current state of the switches.
  • When a switch is added to a group, the rules are not enforced so multiple switches can be turned on.
  • If more than one switch on a group has the startup state set to UP or DOWN then the radio will start with all the affected switches in the group turned on - again breaking the only one rule for a group.
  • If a switch is removed from an always on group the group could be left with no switch turned on.

Other concerns, with the B&W UI:

  • If the switch type is set to None then the group and always on checkbox should be hidden.
  • If the switch is part of an always on group then the switch type 'Toggle' should not be available (the switch will not work as a toggle when in a group).

Expected Behavior

When editing the custom function switches the rules should always be enforced to prevent invalid states being created.

  • When a switch is added to a group:
    • Set the startup state to 'Last Value'.
    • If the group is always on:
      • If the switch type is set to 'Toggle' change it to 2POS.
      • If no switch in the group is on, then turn on the newly added switch.
    • If any other switch in the group is turned on, then turn off the newly added switch.
  • When a switch is removed from a group:
    • If the group is always on, and no other switch in the group is on, turn on the first switch in the group (if there are any).
  • When a group is changed to always on:
    • If no switch in the group is turned on, turn on the first one.
  • When a switch startup state is set to UP:
    • If the switch is in a group then set the start position of all other switches in the group to 'Last Value'
  • When a switch type is set to 'None':
    • Hide the group selector and always on checkbox
  • When a switch is in a group:
    • Do not show the DOWN option for the switch startup state.
    • If the group is always on:
      • Do not show the 'Toggle' option for the switch type.

Steps To Reproduce

Setup custom function switches with the various states described above.

Version

Other (Please specify below)

Transmitter

Jumper T20 V2

Operating System (OS)

No response

OS Version

No response

Anything else?

No response

@philmoz philmoz added bug 🪲 Something isn't working triage Bug report awaiting review / sorting labels May 11, 2024
@3djc
Copy link
Collaborator

3djc commented May 11, 2024

Why can't you have a toggle in a group, if group is not always on ?

i would like to propose an alternative: have initial position setup by group, instead of switches
GroupY: = (then all are remember), SWx (x is up, then rest in the group down), none (only if not always on, all start down)

@philmoz philmoz self-assigned this May 11, 2024
@philmoz
Copy link
Collaborator Author

philmoz commented May 11, 2024

Why can't you have a toggle in a group, if group is not always on ?

i would like to propose an alternative: have initial position setup by group, instead of switches GroupY: = (then all are remember), SWx (x is up, then rest in the group down), none (only if not always on, all start down)

Good points, thank. I've updated the description above.

@philmoz
Copy link
Collaborator Author

philmoz commented May 11, 2024

I would also suggest changing the B&W UI and moving the startup state setting to the end of each switch line and moving the always on checkboxes to a single line where the startup settings currently are.

screenshot_t20v2_24-05-12_10-12-42

@3djc
Copy link
Collaborator

3djc commented May 12, 2024

I really think the group way is much better and easier to understand for users

@philmoz
Copy link
Collaborator Author

philmoz commented May 12, 2024

Something like this?
There is a section for each group where the always on and start switch is set.
When switches are in a group the startup position is hidden for the switch.

screenshot_t20v2_24-05-12_17-19-12

@3djc
Copy link
Collaborator

3djc commented May 12, 2024

YES YES YES !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working triage Bug report awaiting review / sorting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants