When I cut the throttle to zero IN FLIGHT, the system disarmed, and my drone crashed

Days ago, I flew my drone quite high, flight mode is Loiter, I want it landing quickly, so I put the throttle to lowest position, after like several second, I found my machine disarmed, crash to ground, can I set this kind auto disarm for longer time?

Thanks!

Hi Tom,

You haven’t explained very well what happened. Where you still in Loiter? Are you saying it disarmed in the air and then crashed to the ground? Do you have a log to share?

Yes, I was in Loiter mode, I flew quite high, I put throttle in lowest position, after several seconds, the drone was still like 20m high in the air, I can see the machine stopped, crashed down immediately. After I go back home, I check all my drones, I can find any time I put throttle at lowest position after 10 seconds, machines are all auto disarmed, I check source code, from there, I found a parameter called “disarm_delay”, default is 10 seconds, now I change it to 30 seconds, at least I will not put lowest throttle for 30 seconds long when drone is in air.

I have not really deeply studied the program, my current question is:
Is it a system design, whenever system check the throttle at lowest position reaching Disarm_Delay, it will automatically disarmed even the machine is in the air?

Thanks.

Below is related source code, sounds system will auto disarm no matter in any kind of flight mode:
void Copter::auto_disarm_check()
{
uint32_t tnow_ms = millis();
uint32_t disarm_delay_ms = 1000*constrain_int16(g.disarm_delay, 0, 127);

// exit immediately if we are already disarmed, or if auto
// disarming is disabled
if (!motors.armed() || disarm_delay_ms == 0 || control_mode == THROW) {
    auto_disarm_begin = tnow_ms;
    return;
}

#if FRAME_CONFIG == HELI_FRAME
// if the rotor is still spinning, don’t initiate auto disarm
if (motors.rotor_speed_above_critical()) {
auto_disarm_begin = tnow_ms;
return;
}
#endif

// always allow auto disarm if using interlock switch or motors are Emergency Stopped
if ((ap.using_interlock && !motors.get_interlock()) || ap.motor_emergency_stop) {

#if FRAME_CONFIG != HELI_FRAME
// use a shorter delay if using throttle interlock switch or Emergency Stop, because it is less
// obvious the copter is armed as the motors will not be spinning
disarm_delay_ms /= 2;
#endif
} else {
bool sprung_throttle_stick = (g.throttle_behavior & THR_BEHAVE_FEEDBACK_FROM_MID_STICK) != 0;
bool thr_low;
if (mode_has_manual_throttle(control_mode) || !sprung_throttle_stick) {
thr_low = ap.throttle_zero;
} else {
float deadband_top = g.rc_3.get_control_mid() + g.throttle_deadzone;
thr_low = g.rc_3.get_control_in() <= deadband_top;
}

    if (!thr_low || !ap.land_complete) {
        // reset timer
        auto_disarm_begin = tnow_ms;
    }
}

// disarm once timer expires
if ((tnow_ms-auto_disarm_begin) >= disarm_delay_ms) {
    init_disarm_motors();
    auto_disarm_begin = tnow_ms;
}

}

log is below:2017-03-31 20-35-41.tlog (3.6 MB)

Tom,

You missed the most important check there: if you aren’t landed it won’t auto disarm.

Please post the dataflash log, that’s just the telemetry log.

Is this attachment correct?2017-03-26 16-34-25.bin (563.1 KB)
2017-03-26 16-34-25.log.param (5.0 KB)

2017-03-26 16-34-25.log (1.4 MB)