mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-07 00:13:59 -04:00
Copter: don't report initial mode switch as failsafe mode change
This commit is contained in:
parent
186c28c275
commit
f53892a1fa
@ -216,13 +216,11 @@ void Copter::init_ardupilot()
|
|||||||
enable_motor_output();
|
enable_motor_output();
|
||||||
}
|
}
|
||||||
|
|
||||||
// attempt to switch to RTL, if this fails then switch to Land
|
// attempt to set the intial_mode, else set to STABILIZE
|
||||||
if (!set_mode((enum Mode::Number)g.initial_mode.get(), ModeReason::INITIALISED)) {
|
if (!set_mode((enum Mode::Number)g.initial_mode.get(), ModeReason::INITIALISED)) {
|
||||||
// set mode to STABILIZE will trigger mode change notification to pilot
|
// set mode to STABILIZE will trigger mode change notification to pilot
|
||||||
set_mode(Mode::Number::STABILIZE, ModeReason::UNAVAILABLE);
|
set_mode(Mode::Number::STABILIZE, ModeReason::UNAVAILABLE);
|
||||||
} else {
|
AP_Notify::events.user_mode_change_failed = 1;
|
||||||
// alert pilot to mode change
|
|
||||||
AP_Notify::events.failsafe_mode_change = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// flag that initialisation has completed
|
// flag that initialisation has completed
|
||||||
|
Loading…
Reference in New Issue
Block a user