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

RC_Channel: added RC_SWITCH_TYPE parameter #19568

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Dec 18, 2021

this makes setting up the flight mode switch on the widely used OpenTX
radios with 6 mode buttons much easier. Setting RC_SWITCH_TYPE=1 changes the flight mode 6 pos thresholds to be correct for the OpenTX 6 pos switch

this makes setting up the flight mode switch on the widely used OpenTX
radios with 6 mode buttons much easier
@IamPete1
Copy link
Member

Why not a bit in options? Unless we add support for more than 6 modes via this param I cant see us wanting any more than two options so we should be OK as a single bit.

@tridge
Copy link
Contributor Author

tridge commented Dec 19, 2021

Why not a bit in options? Unless we add support for more than 6 modes via this param I cant see us wanting any more than two options so we should be OK as a single bit.

I think we're likely to have other mappings of PWM to flight modes in the future, which makes an enum make sense.
I also would like to add support for more than 6 modes, and this would be the key param to do that. For example, 9 modes using 2 3pos switches, or 12 modes using a 6pos switch and another switch.

@rmackay9
Copy link
Contributor

This looks OK to me.

Re the suggestion of adding more than 6 flight modes through a combination of switches, I'll throw in my regular editorial on this which is that we already support 6 modes on a single switch and additional modes can be triggered from auxiliary switches.

I think attempting to add support for more and more flight modes adds complexity which leads to user error and the real problem is the very limited interface of these classic transmitters (e.g. those without a built in GCS). The proper solution is to replace the transmitter with a Herelink (or similar) or add a GCS which provides so much more feedback and features.

@IamPete1
Copy link
Member

I would prefer to take the opportunity to move to a RCx_OPTION. We could then have FlightMode as a option and FlightMode OpenTX. Then we can do FlightMode 9 and FlightMode A + FlightMode B for mixing or whatever in the future.

I can see that this might back us into a corner where we have to add FLTMODE_CH2 ect

But the concept of supporting different mappings is a good one, we have several issues requesting more than 6 channels.

@tridge tridge added WIP and removed DevCallTopic labels Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants