Skip to content

feat: Remove TR# mixsrc when trainer disabled#2323

Merged
pfeerick merged 5 commits intomainfrom
remove-inactive-trainer-mixsrc
Sep 25, 2022
Merged

feat: Remove TR# mixsrc when trainer disabled#2323
pfeerick merged 5 commits intomainfrom
remove-inactive-trainer-mixsrc

Conversation

@pfeerick
Copy link
Member

@pfeerick pfeerick commented Sep 16, 2022

When a trainer mode is not enabled, there is no point
showing the TR# mixer sources. Once you enable a
trainer option, they will become visible again.

Tested on TX16S and TX12-MKII. TR# sources are only visible when Trainer mode not OFF.

Also fixes issue where validation of input availabliity was not happening on B&W radios 😁

@pfeerick pfeerick added the enhancement ✨ New feature or request label Sep 16, 2022
@pfeerick pfeerick added this to the 2.8 milestone Sep 16, 2022
@lshems
Copy link
Contributor

lshems commented Sep 16, 2022

I have the trainer channels as source on the first line on my inputs, on combi with a switch checking for a value on tr6, trainer mode or not.

What happens with this due to this change?

@pfeerick
Copy link
Member Author

pfeerick commented Sep 16, 2022

Is trainer mode turned OFF in the main model settings? (this isn't connected to the state of the special function) Also, this doesn't alter existing settings - only prevents it from being selected in the UI with trainer mode settings OFF.

@elecpower
Copy link
Collaborator

@pfeerick Companion?

@pfeerick
Copy link
Member Author

Not there yet. Depends on the reception to this potential change ;)

@elecpower
Copy link
Collaborator

I'm in favour of removing anything that is not in context especially shortening lists. If its not in a list then something else needs changing.

@lshems
Copy link
Contributor

lshems commented Sep 17, 2022

There is a difference between being displayed and not being available in a list to select.

Normally, you would make the list consisting of the items available based on context, or scope, with one extra element, the current selected value. This would prevent the issue that if you accidentally enter into edit mode, you can't back out without change. You would be forced to change it to something in scope or context.

If this is how it is meant to work, I fully agree.

At the same time, people in general have a hard time understanding 'scope' or 'context'. A lot of users won't understand they need to activate trainer mode before the list to select sources will contain trainer channels.

@pfeerick
Copy link
Member Author

pfeerick commented Sep 18, 2022

"Normally" is a dangerous word to be throwing around here - normally as defined by who? :-P

But t is normal for the radio user interface behaviour generally. You can often have otherwise "invalid" settings, up to the point at which you go in to edit them, and at that point, they will be validated and invalid entries cleared. By doing this, the radio doesn't immediagely got an clear all your settings on you when you go change another setting. Just imagine, you go in to Model -> Trainer, and turn the trainer mode off - and the radio then goes and removes all the TR# mixsrc (so input and mix sources) and maybe even TR special function from all your models!?! Whereas, in this case, it would leave all settings entirely alone, until the point you click on the choice, and the list is filtered. At that point, it will hilight the top --- entry since the configured source is "invalid" for context (i.e. Trainer is OFF - which btw is a new option since around 2.6 IIRC - you never used to be able to turn it OFF before ;) ). And even then, you have a get-out-of-jail-free card - you can press RTN/tap outside the choice selection and the source will not be changed - you have to press ENT to confirm your selection. Admittedly B&W isn't as user friendly in that regard - pressing RTN and ENT are the same there... maybe that is something we can improve.

As we move more towards allowing stuff to be turned off at the model level, which will be a major part of 2.9, anyone who can't understand "I can can't access GV# if GV is turned off in model settings, I can't access heli tab and heli opts if heli turned off in the model settings" will have to learn that - or complain enough that we need to think about a different way to handle it.

@lshems
Copy link
Contributor

lshems commented Sep 18, 2022

We're at the same point here.

As long as there is the get-out-of-jail-free card.
How that is implemented is less important.

Why not create a display policy for invalid items. Let them preceded by a star and print in fat.

Than you have the best of both worlds: you can ALWAYS directly spot invalid entries, but are still informed about what that invalid entry is. Very useful also in showing for instance logical switches that don't exist anymore on special functions. At least you would know which switch that you just deleted impacted which special function.

There is already such a warning on having multiply on the first mixer line I think.

@raphaelcoeffic
Copy link
Member

IMO the goal is to reduce the size of the list, not prevent anything stupid from being done.

@lshems
Copy link
Contributor

lshems commented Sep 18, 2022

IMO the goal is to reduce the size of the list, not prevent anything stupid from being done.

You cannot prevent people from doing anything stupid. But at least facilitate them correcting it. :)

@pfeerick
Copy link
Member Author

IMO the goal is to reduce the size of the list, not prevent anything stupid from being done.

That it is... and this PR is not going to attempt to go any further than it has (other than making Companion behave the same way)... but I do like what @lshems said, and think that is something worth trying to do... i.e. some "simple" indication that "that source/LS/whatever not exist no more"...

@lshems
Copy link
Contributor

lshems commented Sep 18, 2022

Nice

@elecpower
Copy link
Collaborator

but I do like what @lshems said, and think that is something worth trying to do... i.e. some "simple" indication that "that source/LS/whatever not exist no more"...

It would need to work on B&W and color radios

When trainer mode is not enabled, there is no point
showing the TR# mixer sources. Once you enable a
trainer option, they will become visible again.
@pfeerick pfeerick force-pushed the remove-inactive-trainer-mixsrc branch from 9171ddc to 6e81dc1 Compare September 20, 2022 10:35
@pfeerick
Copy link
Member Author

@elecpower Just to prove I don't know what I'm doing at all 🙃 ... 6e81dc1 seems to do the necessary filtering - i.e. TR# is removed when Trainer mode is off - but I don't know what I need to push/poke so that those same source lists for Input and Mixes tabs reflect the changed state of the trainer combo without requiring the model window to be reloaded. 😆

@elecpower
Copy link
Collaborator

That takes a whisperer ;-)

@elecpower
Copy link
Collaborator

Let me finish the lipo conversion and I'll wave the magic wand over this one

@pfeerick
Copy link
Member Author

Thank you 😍 It will be another useful reference commit, as that sort of dynamic update may start to appear more soon :)

@elecpower
Copy link
Collaborator

@pfeerick The Whisperer has spoken to the Beast and can report that your wish has been granted. [insert applause sound effect here]

PS Lucky for me the refresh plumbing framework that I put in place a while back was already in this area so an easy one this time.

@pfeerick
Copy link
Member Author

Damn, you are on fire! :)

PS: Just don't look too hard...
https://media4.giphy.com/media/l4Hoe5Xzfh5UBahVK/giphy.gif

@pfeerick pfeerick merged commit 3969b2b into main Sep 25, 2022
@pfeerick pfeerick deleted the remove-inactive-trainer-mixsrc branch September 25, 2022 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ✨ New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants