How to Program 6 Flight Modes for ArdupilotMega - JR 9303 Example

In the APM wiki, on the page about connecting your RC equipment, there is the following comment:
If you want to have six modes, you'll probably have to configure your RC transmitter to do this. That's usually accomplished by mixing a two position switch and a three position switch on your transmitter.

However, no example is given as to how this mix might work. In the comments to this blog post Setting Flight Mode with Hitec Aurora 9 there is a method given by Juan Enrique that I did in fact get to work with my JR 9303, however, it only gives you 5 flight modes, and not 6.

For those that want the full taco, and have a Tx with both a 3-position switch and a 2-position switch, try the following mix. I've only tested this on my JR9303 but really it should be easy to translate to any other Tx.

1) Choose your two switches. For this example I am choosing:
- Flap switch = 3 Position switch (also called my Flight Mode switch on the 9303)
- Gear switch = 2 Position

2) Modify the end-point (or travel adjust) on your 3 Position switch. Instead of travelling +100/-100, you need to change it to +65/-65. On the JR radio, if you are also using the Flap switch, this will actually show as Up 65/ Down 65, but it's the same thing.

Don't mess with the end-point (or travel adjust) of your Gear switch, leave it at +100/-100.

3) Now create your mix. On the 9303 there are two types of mixes: programmable mix 1 & 2 are multi-point, 3-6 are "standard" mixes. While you could probably get the multi-points to work, don't bother, just pick one of the standard mixes. I chose mix #3.

You are going to mix your 2-Position Switch (Gear) -> 3-Position Switch (Flap). In some terminologies, the equivalent statement is that your Master Channel will be the 2-Position Switch, and your Slave Channel will be the 3-Position Switch.

Really the screenshots below will explain much better than I can in writing. Basically:

- When your 2-Position Switch is "On" (position 1), set the mix to the 3-Position switch at -17 for the 3-Position switch in the "down" position, and 0 for 3-Position Switch in the "up" position.

- When the 2-Position Switch is "Off" (position 0), set the mix to the 3-Position switch at -33 for the 3-Position switch in the "up" position, and 0 for the 3-Position Switch in the "down" position.

4) Confirm that you get the correct PWM measurements. Do this by using the convenient test mode on the APM (v2 only), accessible via the CLI. See this page for how to access the CLI: APM CLI. Once connected to your APM, type "test" then hit Enter. Next type "pwm" then hit Enter. Make sure your radio is on. You will see rows streaming by with the PWM outs for all 8 channels. If you have the standard setup your flight modes will be on channel 8. Confirm that by moving your 3-Position and 2-Position switches you get all 6 of the following PWM values, or close to it:


These are the ideal values, but if you are slightly off that's ok. For reference, here is what the APM is looking for:

Flight Mode #
  --  Min. PWM  --  Ideal PWM  --  Max. PWM

#5  --  1750  --  1815  --  >1815

#4  --  1620  --  1685  --  1749

#3  --  1490  --  1555  --  1619

#2  --  1360  --  1425  --  1489

#1  --  1230  --  1295  --  1359

#0  --  <1165  --  1165  --  1229


You can assign any flight mode to any number with one exception: Flight Mode 5 (PWM >1750) is ALWAYS manual. This can't be changed (unless you want to modify APM code yourself). The reason for this is the fail-safe.

To assign the desired flightmode to each of these numbers (except of course #5), you again use the CLI in the Setup Menu -> "modes" command.

Question: Since Flight Mode 5 is always Manual, what happens if you don't like the direction your Tx switches end up at? You can try two things:
- Use channel reversing on your 3-Position switch.
- For your 2-Position switch, you'll notice that reversing the channel on your Tx will have no effect on the PWM output. If you want to reverse your 2-Position switch, you have to modify the mix. Instead -17 and -33, change these mix values to +17 and +33, and swap their locations (from 3-Position switch "up" to "down" and vice versa). Again, see the photos below for clarification.

Question: What if my PWM values aren't exactly what you get? In this case, try adjusting the mix values. Note that if you increase one, you will probably need to decrease the other (so if you up the 17, you might find you'll need to lower the 33). The end-points also make a difference and if you want you can adjust those, but I think the +65/-65 is what you really want.

Hope this helps someone... It drove me nuts for hours.


Travel adjust / end-point adjust (different names for the same thing). Set your 3-Position switch to +65/-65 (here I am using the flap switch)

Mix your 2-Position switch (Gear in this case) to your 3-Position switch (Flap in this case) and have the mix be controlled by the 2-Position switch (Gear)

Alternate mix if you want to reverse the direction of your 2-Position switch (Gear in this case). To reverse the direction of your 3-Position switch, just use the channel reversing function in your Tx.

Example output of the "pwm" test program from the APM command-line-interface. Channel 8 is showing flight mode #5 (manual).

Views: 15540

Comment by Justin Martin on March 25, 2015 at 6:05pm

This works great. One request however. I would like to program a safety switch. By this I mean if I activate the safety switch, it goes straight to manual no matter what. This will come in handy when having to deal with numerous switch combinations. I have tried several times on my own however I can not figure it out.

Current setup on a JRx9503:

I have Aux 2 switch (3 pos) programmed for flight modes (this eradicates Dual Rates when I switch between manual and any other mode.

FM0, Gear up; Manual

FM0 Gear Down; Stabilize

FM1 Gear Down; FBWA

FM1 Gear Up; FBWB

FM2 Gear Up; Autotune

FM2 Gear Down; Circle

I am currently utilizing Flaps and all D/R switches, leaving the "mix 2" (2 pos) switch open. 

Any Ideas?


Comment by Vitalii S. on May 16, 2015 at 4:37pm

ok. Tomorrow will try it on my JR XG14.

Comment by Vitalii S. on May 20, 2015 at 9:34am

It's excellent explanation how to config Japan Radio. Tested with my XG8 and XG14.

So now I have all flight modes (reversed 3-pos stick exactly as you described and changed limits to +75, -75).



You need to be a member of DIY Drones to add comments!

Join DIY Drones

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2020   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service