File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,13 @@ VtolTakeoff::on_active()
142
142
143
143
case vtol_takeoff_state::CLIMB: {
144
144
145
+ // reset any potentially valid reposition triplet which was not handled
146
+ // we do this to avoid random loiter locations after switching to loiter mode after this
147
+ position_setpoint_triplet_s *reposition_triplet = _navigator->get_reposition_triplet ();
148
+ _navigator->reset_position_setpoint (reposition_triplet->previous );
149
+ _navigator->reset_position_setpoint (reposition_triplet->current );
150
+ _navigator->reset_position_setpoint (reposition_triplet->next );
151
+
145
152
// the VTOL takeoff is done, proceed loitering and upate the navigation state to LOITER
146
153
_navigator->get_mission_result ()->finished = true ;
147
154
_navigator->set_mission_result_updated ();
You can’t perform that action at this time.
0 commit comments