Skip to content

Commit

Permalink
ArduPlane: make bad-mode-number notification consistent across vehicles
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and rmackay9 committed Sep 1, 2021
1 parent 2d02396 commit d6a2056
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ArduPlane/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ bool Plane::set_mode_by_number(const Mode::Number new_mode_number, const ModeRea
{
Mode *new_mode = plane.mode_from_mode_num(new_mode_number);
if (new_mode == nullptr) {
gcs().send_text(MAV_SEVERITY_INFO, "Error: invalid mode number: %d", new_mode_number);
notify_no_such_mode(new_mode_number);
return false;
}
return set_mode(*new_mode, reason);
Expand Down

0 comments on commit d6a2056

Please sign in to comment.