When my plane is in Auto mode and flies out of range of my RC gear (at about 1.2km), the failsafe is triggered. I have set my receiver to deliver a signal around 920 when it loses the Tx. This results in CIRCLE mode followed by RTL. However, looking at the code, I don't see how this is possible in Auto mode.


The code below (from events.pde) is the short event failsafe. If I am in auto mode, it should go and check the short_fs_action, determine that I have set it to 1 and then RTL. However, what I see when flying is circle mode then RTL 20 seconds later.


What I really want to do is stay in auto mode even if the failsafe triggers and finish the mission. However, if I set the failsafe action to none, the plane goes into MANUAL mode if failsafe is detected when in Auto mode. I've only tested this last one on the ground by turning off my Tx  - to test in the air would be catastrophic if the same thing happened.


So my question is - how does the plane end up in Circle or Manual modes on failsafe?


I'm running Arduplane 2.65.



static void failsafe_short_on_event(int16_t fstype)
// This is how to handle a short loss of control signal failsafe.
failsafe = fstype;
ch3_failsafe_timer = millis();
gcs_send_text_P(SEVERITY_LOW, PSTR("Failsafe - Short event on, "));
case MANUAL:
case FLY_BY_WIRE_A: // middle position
case FLY_BY_WIRE_B: // middle position

case AUTO:
case GUIDED:
case LOITER:
if(g.short_fs_action == 1) {

case CIRCLE:
case RTL:
gcs_send_text_fmt(PSTR("flight mode = %u"), (unsigned)control_mode);

Views: 1108

Reply to This

Replies to This Discussion

Ok, figured it out. The failsafe on my Reciever on channel 8 was sending a PWM signal for MANUAL, so when the receiver failsafes, it switches the APM to MANUAL, which then triggers circle mode. That also explains the behaviour when failsafe action is set to none.


Hi James, I'm having the same issue with my Aurora 9. Its driving me crazy.Did you manage to solve it?

The answer was mainly in setting up my reciever.  When a Spektrum reciever (which is what I am using) failsafes, it sets all channels to whatever value was saved during the binding process. So they key is binding to my Rx with the mode switch set to the Auto position.


I have turned off all other failsafe functionality in mission planner to avoid it doing RTL when I am in Auto Mode.


So now what I get is

  1. - if I am in Auto mode and the plane failsafes, it stays in Auto mode and completes the mission
  2. - if I am in any other mode and plane failsafes, it goes to Circle then RTL


This is exactly what I wanted it to do. Technically, doing option 1 is illegal because I now have a plane that I am not in control of, although that is only sort of true since my 900Mhz telemetry link to my laptop is still connected (that range is far longer) and I can command the plane RTL using that if desired.


I have never used an Aurora 9, but it is worth checking what happens to the channels on failsafe. Not all systems work the same way.


The easiest way to do this is turn on your plane on the ground and use the tuning graphs in mission planner to see what happens to the channel values. Turn off your transmitter to simulate a failsafe event and watch what happens to the channel values. Make sure you remove your prop in case the motor fires up!



Hi James,

I'm starting to implement APM in my plane and your post helped me understand these features a bit better, thanks. I haven't gone to wireless telemetry yet but would like to. However the laptop I am using is impossible to see in the daytime outdoors. How did you solve this issue? I've been sending video back to the ground for sometime to fly FPV and I use a 12" monitor in a box painted black and that works pretty well. I've thought about getting a small headless PC (raspberry pi?) and connecting it to the monitor but not sure it has the horsepower.



Regarding the failsafe functions with spektrum receivers.

Not all spektrum receivers have a desirable failsafe behaviour.

While it seems the throttle signal will be commanded to the low position or a preset position during a failsafe condition on most if not all spektrum RX's, the same cannot be said for the other channels.

Some of the ones that I have, [ AR6200, AR6210, AR400, AR600C ] do not allow the other channels to be pre-set with failsafe positions. Instead some either HOLD last position or they REMOVE the output pulse during the failsafe condition, it varies from RX to RX.

If you were flying in MANUAL mode with APM and the failsafe function on your RX implemented the HOLD feature, the hardware failsafe on the APM would prevent the autopilot from being able to control the servos because the RX would maintain the same PWM output & keep APM in manual mode.  :(

So check & double check that the failsafe functions on both APM & your RX work as you expect them to.

Thanks Chris. I've only used the Spektrum Rx's AR7010 and AR8000. I didn't realise the others did not have the same behaviour.

@Paul - I agree that laptop screens are not very good in the full sun. I don't have any brilliant ideas here. What I do is take a fold up chair outside and put the laptop on it. Arrange the chair back so it shades the screen. In the middle of the day I tie an umbrella to the chair to provide shade. Turn the screen brightness to maximum.

A few weeks ago it was over 40C here in Perth, Western Australia. I foolishly went flying anyway. My laptop is black and got so hot in the sun that it shut itself down to protect the processor! I guess I need better shading!



Thanks James. Do you also transmit video or just use the telemetry? I'd like to maintain the video but I'd have to switch to 5.8 to free up 900 MHz for the telemetry. I love what the autopilot can do but would like to keep the complexity down at first so I think I'll see how much I can learn before upgrading to telemetry.

On the failsafe, I was able to set mine up with my spektrum so it appears to work on the ground but I'm afraid to test it. :-) One question I had that I could not find answered anywhere is when I test on the ground I see the output to the motor drops to zero during failsafe. Is that only because it's not moving? Does the failsafe return under power and does it check to make sure it's flying so it doesn't cut you up while testing on the ground? I'd like to know all this before I test for real but couldn't find it in the wiki.

I wish it was warm here! :-)



I also transmit video using 5.8ghz. I use a 600mw immersion rc video transmitter, which is very small and light. On the ground I use the mission planner antenna tracker functionality with a diversity receiver with circular polarized and high gain helical antennas, these get me to around 3-4km (I think, I haven't found the limit yet).

The arduplane software is designed so that the motor won't run in auto and rtl, circle, loiter etc modes while the planes speed is less than a certain amount. This is for safety. You can either test failsafe in a HIL simulation or in the sky if you are brave!

Wow, video out to 4km! That would be worth the upgrade right there. I'll have to order one of those sets and give that a try first as I'm always looking for better distance. And once I get that going that will leave the telemetry open at 900 Mhz.

Ah, that's what I thought about the throttle but didn't want to test it in the air until I knew for sure. And, of course I have to get it tuned in to fly with the autopilot a bit better because I have a very different airframe than the little foamies that are popular.

Thanks for your help James!

Reply to Discussion


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