fix(navigator): re-evaluate climb requirement on mission cursor change

Without this, a cursor change while the vehicle is below the target
altitude leaves handleTakeoff() publishing the raw item lat/lon as a
POSITION setpoint, causing a diagonal takeoff.
This commit is contained in:
gguidone
2026-05-13 15:17:21 +02:00
parent 6464c1cf1d
commit 466abb3ecc
+5
View File
@@ -450,6 +450,11 @@ void MissionBase::update_mission()
_navigator->reset_vroi();
if (_navigator->get_mission_result()->valid) {
/* re-issue the climb ticket on cursor change while in takeoff phase */
if (_land_detected_sub.get().landed || _work_item_type == WorkItemType::WORK_ITEM_TYPE_CLIMB) {
checkClimbRequired(_mission.current_seq);
}
/* reset work item if new mission has been accepted */
_work_item_type = WorkItemType::WORK_ITEM_TYPE_DEFAULT;