Hi, my quadcopter flipped in mid air and crashed while in auto mode. T_T The first time I think it is hardware power failure, but the log clearly shows that it recorded the whole unusual process, as follows:
In the plot, strange thing happens on the motor outputs, all ouputs hold their history values, until the end. And I’m sure the values didn’t reach their saturation.
My FW version is Cotper-3.6.0 stable, and I add some code to waiting for the rotors actually spin up in Arducopter/Motors.cpp. Apart of it as follows:
@@ -240,6 +241,10 @@ bool Copter::init_arm_motors(const bool arming_from_gcs, const bool do_arming_ch
// Start the arming delay
ap.in_arming_delay = true;
+ // Start the motor actually spin safe delay
+ ap.in_motor_spin_delay = true;
+ AP_Notify::flags.in_motor_start_spin_delay = true;
+
// assumed armed without a arming, switch. Overridden in switches.cpp
ap.armed_with_switch = false;
@@ -297,6 +302,8 @@ void Copter::init_disarm_motors()
hal.util->set_soft_armed(false);
ap.in_arming_delay = false;
+ ap.in_motor_spin_delay = false;
+ AP_Notify::flags.in_motor_start_spin_delay = false;
}
// motors_output - send output to motors library which will adjust and send to ESCs and servos
@@ -317,6 +324,14 @@ void Copter::motors_output()
ap.in_arming_delay = false;
}
+ //Update motors actually spin from stop state
+ if (ap.in_motor_spin_delay &&
+ (!motors->armed() || millis()-arm_time_ms > (ARMING_DELAY_SEC + motors->get_motor_spool_time_sec() + SAFE_TAKEOFF_DELAY_SEC)*1.0e3f || control_mode == THROW)) {
+ ap.in_motor_spin_delay = false;
+ AP_Notify::flags.in_motor_start_spin_delay = false;
+ Log_Write_Event(DATA_COPTER_ROTOR_RUNUP_CMPL);
+ }
+
// output any servo channels
SRV_Channels::calc_pwm();
I am sure my code is not thing to do with this strange outputs.
What possible reasons may cause so badly crash like this??? I’m looking forward to your ideas. Thanks!!!
Here is the log file:
2019-06-26 18-23-06.bin (958.8 KB)