mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 11:53:34 +08:00
navigator: reset triplets during onboard/offboard mission update
This commit is contained in:
committed by
Lorenz Meier
parent
c84c7cdcb4
commit
5b03c5f68e
@@ -303,6 +303,9 @@ Mission::find_offboard_land_start()
|
||||
void
|
||||
Mission::update_onboard_mission()
|
||||
{
|
||||
/* reset triplets */
|
||||
_navigator->reset_triplets();
|
||||
|
||||
if (orb_copy(ORB_ID(onboard_mission), _navigator->get_onboard_mission_sub(), &_onboard_mission) == OK) {
|
||||
/* accept the current index set by the onboard mission if it is within bounds */
|
||||
if (_onboard_mission.current_seq >= 0
|
||||
@@ -350,6 +353,9 @@ Mission::update_offboard_mission()
|
||||
{
|
||||
bool failed = true;
|
||||
|
||||
/* reset triplets */
|
||||
_navigator->reset_triplets();
|
||||
|
||||
if (orb_copy(ORB_ID(offboard_mission), _navigator->get_offboard_mission_sub(), &_offboard_mission) == OK) {
|
||||
// The following is not really a warning, but it can be useful to have this message in the log file
|
||||
PX4_WARN("offboard mission updated: dataman_id=%d, count=%d, current_seq=%d", _offboard_mission.dataman_id,
|
||||
|
||||
Reference in New Issue
Block a user