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

feat: customisable switches generated sources #5016

Merged
merged 10 commits into from
Jun 7, 2024

Conversation

3djc
Copy link
Collaborator

@3djc 3djc commented May 16, 2024

This add 3 sources (GR1 to GR3) on radio that have customisable switches as described in #4989

This PR is best when used in conjunction with #4994 (which prevents user misconfiguration)

This fixes #4989

@elecpower: I've done my best for companion support, but please check thoroughly.

@3djc 3djc requested a review from elecpower May 16, 2024 09:17
@elecpower
Copy link
Collaborator

@3djc IMO this needs to be based on #4722.
@philmoz and I have already spent time keeping 4722 rebased (the sooner it is merged or closed the better).
I'll have a look at what you have done so far and provide feedback but not approve until priorities are resolved by someone on a higher pay grade.

@pfeerick
Copy link
Member

pfeerick commented May 16, 2024

Sounds good to me... had been ignoring it somewhat since it was still tagged as 'draft'. So looks like it will be #4722, #4994 and then #5016 (in order of age)?

@pfeerick pfeerick added the enhancement ✨ New feature or request label May 16, 2024
@pfeerick pfeerick added this to the 2.11 milestone May 16, 2024
@pfeerick pfeerick changed the title Feat: customisable switches generated sources feat: customisable switches generated sources May 17, 2024
@elecpower
Copy link
Collaborator

elecpower commented May 17, 2024

Tested Companion and T20 libsim.

  1. create new model in Companion - pass
  2. configure custom switches across 2 groups - pass
  3. add inputs, mixes, logical switches and special functions referencing the 3 groups and sources either side in the lists - pass
  4. save, close and reopen the models and settings - pass
  5. check Companion encode and decode - pass
  6. launch simulator - pass
  7. check simulator decode - pass
  8. make a small change to force the yaml to be written - pass
  9. copy and zip the files into an etx file - pass
  10. close the simulator - pass
  11. close the models and settings - pass
  12. open the simulator generated models and settings - pass
  13. check the simulator encode and Companion decode - pass

For consistency with other sources and switches and to keep lists short, groups should only be available for selection in lists when they are configured.

The groups should optionally allow them to have user defined names assigned like all other sources and switches, and for the same reasons they have user defined names. I can imagine this would be the first enhancement request after the feature becomes available so why not do it as part of this implementation to save rework.

@elecpower
Copy link
Collaborator

Sounds good to me... had been ignoring it somewhat since it was still tagged as 'draft'. So looks like it will be #4722, #4994 and then #5016 (in order of age)?

Re Draft, I do not see any changes except for rebases from @philmoz so best to check with him him being ready for Review.

@elecpower
Copy link
Collaborator

@3djc 4722 WILL break this due to the index change from zero to one based

@3djc
Copy link
Collaborator Author

3djc commented May 17, 2024

I'll review this when #4722 gets merged, but I agree, we need to changes merged sooner rather than later

@3djc 3djc force-pushed the 3djc/custom-switches-as-source branch from 76b59db to 41ecf71 Compare May 31, 2024 10:14
@3djc
Copy link
Collaborator Author

3djc commented May 31, 2024

Ready for test

@elecpower
Copy link
Collaborator

Still needs to have unused/not configured GRx suppressed to be consistent with other types

@3djc
Copy link
Collaborator Author

3djc commented May 31, 2024

Still needs to have unused/not configured GRx suppressed to be consistent with other types

Radio side is ready to push, where should I look in companion code for cpn ?

@elecpower
Copy link
Collaborator

RawSource::isAvailable to show/hide in lists.
Ensure group config changes trigger the lists to be refreshed.

@3djc
Copy link
Collaborator Author

3djc commented May 31, 2024

Will add companion side show/not show once #4994 has been merged, as some functions I need are in there. Anohow, thats more icing o n the cake and can be merge as such imho

@elecpower
Copy link
Collaborator

IMHO it does not get merged until it is a completed feature as this is how the two get out of sync.

@3djc
Copy link
Collaborator Author

3djc commented Jun 2, 2024

@elecpower , could you please take care of : Ensure group config changes trigger the lists to be refreshed.

@3djc
Copy link
Collaborator Author

3djc commented Jun 2, 2024

Thanks @elecpower , seems to work ok :) (obviously your change do, but I was referring here about the whole PR :))

@pfeerick pfeerick force-pushed the 3djc/custom-switches-as-source branch from 33032fd to 7f58f91 Compare June 6, 2024 02:50
@pfeerick pfeerick added the user manual change Will impact on the user manual in some respect label Jun 7, 2024
@pfeerick
Copy link
Member

pfeerick commented Jun 7, 2024

This is working better than I could have hoped when the customisable switches were first introduced, and the need for a traditional 6POS needed.

Just one tiny detail... GR2 and GR3 don't actually appear to giving any output here? GR1 works, but GR2 and GR3 don't 😢 Unless I missed something in configuring this?

pr5016.yml.zip

Just a thought... can we get something for the GRx in the popup source lists also? Not an issue either way, as logical switches aren't there either, so maybe this is can be considered a switch also?

@3djc 3djc force-pushed the 3djc/custom-switches-as-source branch from 7f58f91 to a02dcc1 Compare June 7, 2024 08:53
@3djc
Copy link
Collaborator Author

3djc commented Jun 7, 2024

I believe I have fixed the computation issue (thanks to the just in time T15 merged that allowed me to work with debug (yeah !!)), but please test it thoroughly.

Not sure I understand your other point, maybe ping me on discord ?

@pfeerick
Copy link
Member

pfeerick commented Jun 7, 2024

I think that is probably topic for a followup PR... I was referring to this popup menu...

image

Would be nice to have shortcuts to the customisable switch groups and/or LS... but it also needs to not show trainer when trainer is not actually configured.

On colorlcd, probably needs to get added to the switches filter group also.

And I thought you'd like being able to rebase to include the T15 ;)

Copy link
Member

@pfeerick pfeerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on T-Pro and T15 :)

@pfeerick pfeerick merged commit 280d3af into main Jun 7, 2024
48 checks passed
@pfeerick pfeerick deleted the 3djc/custom-switches-as-source branch June 7, 2024 21:51
pfeerick pushed a commit that referenced this pull request Jun 10, 2024
@pfeerick pfeerick added the rn: feature Feature to be highlighted in release notes label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request rn: feature Feature to be highlighted in release notes user manual change Will impact on the user manual in some respect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve customisable switches with automatic "source "
3 participants