Copter: Allow safe shutdown before disarming
This commit is contained in:
parent
7ff3a49a10
commit
f96da56ad6
@ -810,7 +810,7 @@ void Copter::ModeAuto::spline_run()
|
||||
void Copter::ModeAuto::land_run()
|
||||
{
|
||||
// disarm when the landing detector says we've landed
|
||||
if (ap.land_complete) {
|
||||
if (ap.land_complete && motors->get_spool_mode() == AP_Motors::GROUND_IDLE) {
|
||||
copter.init_disarm_motors();
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ void Copter::ModeLand::run()
|
||||
void Copter::ModeLand::gps_run()
|
||||
{
|
||||
// disarm when the landing detector says we've landed
|
||||
if (ap.land_complete) {
|
||||
if (ap.land_complete && motors->get_spool_mode() == AP_Motors::GROUND_IDLE) {
|
||||
copter.init_disarm_motors();
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ void Copter::ModeLand::nogps_run()
|
||||
}
|
||||
|
||||
// disarm when the landing detector says we've landed
|
||||
if (ap.land_complete) {
|
||||
if (ap.land_complete && motors->get_spool_mode() == AP_Motors::GROUND_IDLE) {
|
||||
copter.init_disarm_motors();
|
||||
}
|
||||
|
||||
|
@ -357,7 +357,7 @@ void Copter::ModeRTL::land_run(bool disarm_on_land)
|
||||
_state_complete = ap.land_complete;
|
||||
|
||||
// disarm when the landing detector says we've landed
|
||||
if (disarm_on_land && ap.land_complete) {
|
||||
if (disarm_on_land && ap.land_complete && motors->get_spool_mode() == AP_Motors::GROUND_IDLE) {
|
||||
copter.init_disarm_motors();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user