Skip to content

Commit

Permalink
navigator: set default acceptance radius in reset_triplets method
Browse files Browse the repository at this point in the history
Signed-off-by: RomanBapst <bapstroman@gmail.com>
  • Loading branch information
RomanBapst committed Jan 20, 2020
1 parent ef0e532 commit 48b853b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/modules/navigator/navigator_main.cpp
Expand Up @@ -668,14 +668,10 @@ Navigator::run()
!((_vstatus.nav_state == vehicle_status_s::NAVIGATION_STATE_AUTO_TAKEOFF)
|| (_vstatus.nav_state == vehicle_status_s::NAVIGATION_STATE_AUTO_MISSION))) {

reset_triplets();
_pos_sp_triplet.current.type = position_setpoint_s::SETPOINT_TYPE_IDLE;
_pos_sp_triplet.current.valid = true;
_pos_sp_triplet.current.timestamp = hrt_absolute_time();
_pos_sp_triplet.current.acceptance_radius = get_acceptance_radius();

_pos_sp_triplet.previous.valid = false;

_pos_sp_triplet.next.valid = false;
}

/* if nothing is running, set position setpoint triplet invalid once */
Expand Down Expand Up @@ -838,6 +834,10 @@ Navigator::reset_triplets()
_pos_sp_triplet.previous.valid = false;
_pos_sp_triplet.next.valid = false;
_pos_sp_triplet_updated = true;
_pos_sp_triplet.previous.acceptance_radius = get_default_acceptance_radius();
_pos_sp_triplet.current.acceptance_radius = get_default_acceptance_radius();
_pos_sp_triplet.next.acceptance_radius = get_default_acceptance_radius();

}

float
Expand Down

0 comments on commit 48b853b

Please sign in to comment.