Servers by jDrones

Taranis X9D 6-position switch for flight mode selection

A while ago, I added a 6-position switch to my X9D (OpenTX 2.3.5) and set it up as S3. On the radio itself, I’ve selected S3_1 to S3_6 to select the OpenTX flight modes and named them in the same order I have selected on the flight controller (I know this is not needed to change the actual flight mode, but I wanted it to be like that).

Now I want the same switch to select flight modes on my ArduCopter Multicopter (Pixhawk with S-BUS R-XSR receiver). I’ve mapped S3 to channel 5, which seems to be default for flight mode selection on Copter. But the PWM ranges between switch steps do not “fit”. I’m not sure which way I should choose to correct this. With OpenTX and some logical switches or with a curve? Or even change something on the flight controller?

I’m looking for the “recommended” or least complicated way to do this. :nerd_face: :slightly_smiling_face:

You might have to make 6 mixes under channel 5.

Set each mix to be source MAX then set the offsets equal to the pwm ranges. You can then choose an enable switch in each mix for the switch step.

1 Like

If the S3 6-pos switch works like an S2 pot this is all you should have to do. It’s set up on Chan 8 and I don’t have S3 but the same thing should work. It works fine on my Taranis by rotating the S2 pot thru it’s range and the Flight Modes are selected within their ranges.

Pot flight mode

1 Like

Thank you guys! As I already expected, there are multiple ways to do this! :slight_smile:

Yes, the switch is basically a pot like S1/S2, just latching in six positions.

It can be configured as switch or as pot in OpenTX.

What I did now, is create a custom 6-point curve:

And then set the curve for S3 in the mix settings:

I got the numbers, by using the distance between the mid points of each range, expect for -100 and +100 for the first and the last mode:

1000 --> -100
1296 --> -41
1426 --> -15
1556 --> 11
1685 --> 37
2000 --> 100

Works fine!

2 Likes

That is a nice way to do it! Very clean.

2 Likes

Yes, always more ways to skin the cat with OpenTx!

2 Likes

Looking at the curve, I found a way even simpler:

Just create a 2-points curve and set the first value to -68 and the second/last value to 64.

This will create a straight line with a slope fitting the values Ardupilot is expecting for setting the flight mode.

1 Like

Why do you need a curve at all? Do the 6 detent positions not line up with the mode ranges when simply using S2 weight 100%?

1 Like

No, unfortunately, they don’t.

With default settings, the first position equals to S3_1, but the second position already jumps over S3_2 to S3_3. This may depend on the hardware (switch) used.

1 Like

OK, got it! Like you I’m always looking for the simplest solution and you have probably found it for this switch. I was messing around in Betaflight the other day and am impressed with the way they have configurable ranges for mode switching. Gives a lot of flexibility.

1 Like

Yeah, tell me about it! :slightly_smiling_face:

As it happens, I was just looking for the possibility to adjust the range for a 3-position switch in ArduCopter. But it seems this is better solved on the radio, not on the FC.

I’m sure that ArduCopter is very sophisticated in its core functionality. But the configuration is sometimes really complicated.

1 Like
Servers by jDrones