Copter: `ModeAuto::do_guided` use `in_guided_mode` method

This commit is contained in:
Iampete1 2024-09-15 16:21:52 +01:00 committed by Randy Mackay
parent da33532dbb
commit ad1bf0b59e
1 changed files with 1 additions and 1 deletions

View File

@ -824,7 +824,7 @@ void ModeAuto::exit_mission()
bool ModeAuto::do_guided(const AP_Mission::Mission_Command& cmd)
{
// only process guided waypoint if we are in guided mode
if (copter.flightmode->mode_number() != Mode::Number::GUIDED && !(copter.flightmode->mode_number() == Mode::Number::AUTO && _mode == SubMode::NAVGUIDED)) {
if (!copter.flightmode->in_guided_mode()) {
return false;
}