mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-30 12:38:33 -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();
|
||||
}
|
||||
|
||||
// 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)) {
|
||||
// set mode to STABILIZE will trigger mode change notification to pilot
|
||||
set_mode(Mode::Number::STABILIZE, ModeReason::UNAVAILABLE);
|
||||
} else {
|
||||
// alert pilot to mode change
|
||||
AP_Notify::events.failsafe_mode_change = 1;
|
||||
AP_Notify::events.user_mode_change_failed = 1;
|
||||
}
|
||||
|
||||
// flag that initialisation has completed
|
||||
|
Loading…
Reference in New Issue
Block a user