mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 17:35:22 +08:00
Navigator: Initialize RTL state properly
This commit is contained in:
@@ -99,6 +99,8 @@ RTL::on_activation()
|
||||
set_current_position_item(&_mission_item);
|
||||
struct position_setpoint_triplet_s *pos_sp_triplet = _navigator->get_position_setpoint_triplet();
|
||||
mission_item_to_position_setpoint(&_mission_item, &pos_sp_triplet->current);
|
||||
pos_sp_triplet->previous.valid = false;
|
||||
pos_sp_triplet->next.valid = false;
|
||||
|
||||
/* for safety reasons don't go into RTL if landed */
|
||||
if (_navigator->get_land_detected()->landed) {
|
||||
|
||||
Reference in New Issue
Block a user