Copter: pass reason through in set_mode AP_Vehicle override

Other vehicles seem to do this correctly.
This commit is contained in:
Peter Barker 2020-07-26 11:39:38 +10:00 committed by Randy Mackay
parent 9cc8b2f21a
commit 73526c0256

View File

@ -300,7 +300,7 @@ bool Copter::set_mode(const uint8_t new_mode, const ModeReason reason)
return false;
}
#endif
return copter.set_mode(static_cast<Mode::Number>(new_mode), ModeReason::GCS_COMMAND);
return copter.set_mode(static_cast<Mode::Number>(new_mode), reason);
}
// update_flight_mode - calls the appropriate attitude controllers based on flight mode