Copter: Adding flight mode to flight mode unchangeable messages

This commit is contained in:
murata 2020-02-29 08:23:13 +09:00 committed by Randy Mackay
parent f6ab998924
commit 2822fa68fc

View File

@ -213,7 +213,7 @@ bool Copter::set_mode(Mode::Number mode, ModeReason reason)
#endif
if (!in_autorotation_check) {
gcs().send_text(MAV_SEVERITY_WARNING,"Flight mode change failed");
gcs().send_text(MAV_SEVERITY_WARNING,"Flight mode change failed %s", new_flightmode->name());
AP::logger().Write_Error(LogErrorSubsystem::FLIGHT_MODE, LogErrorCode(mode));
return false;
}
@ -251,7 +251,7 @@ bool Copter::set_mode(Mode::Number mode, ModeReason reason)
}
if (!new_flightmode->init(ignore_checks)) {
gcs().send_text(MAV_SEVERITY_WARNING,"Flight mode change failed");
gcs().send_text(MAV_SEVERITY_WARNING,"Flight mode change failed %s", new_flightmode->name());
AP::logger().Write_Error(LogErrorSubsystem::FLIGHT_MODE, LogErrorCode(mode));
return false;
}