mission: reset work_item_type during mission inactivation

- this fixes a race condition which happens when an RTL is triggered
during the final approach of a mission landing. In that case the mission inactive
method is never called.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
RomanBapst 2020-10-27 15:06:28 +03:00 committed by Lorenz Meier
parent b63f202b3c
commit 6c3f413379
1 changed files with 3 additions and 0 deletions

View File

@ -158,6 +158,9 @@ Mission::on_inactivation()
}
_time_mission_deactivated = hrt_absolute_time();
/* reset so current mission item gets restarted if mission was paused */
_work_item_type = WORK_ITEM_TYPE_DEFAULT;
}
void