mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 15:03:34 +08:00
navigator: reset triplets during onboard/offboard mission update
This commit is contained in:
committed by
Lorenz Meier
parent
c84c7cdcb4
commit
5b03c5f68e
@@ -657,10 +657,7 @@ Navigator::task_main()
|
||||
/* if nothing is running, set position setpoint triplet invalid once */
|
||||
if (_navigation_mode == nullptr && !_pos_sp_triplet_published_invalid_once) {
|
||||
_pos_sp_triplet_published_invalid_once = true;
|
||||
_pos_sp_triplet.previous.valid = false;
|
||||
_pos_sp_triplet.current.valid = false;
|
||||
_pos_sp_triplet.next.valid = false;
|
||||
_pos_sp_triplet_updated = true;
|
||||
reset_triplets();
|
||||
}
|
||||
|
||||
if (_pos_sp_triplet_updated) {
|
||||
@@ -815,6 +812,17 @@ Navigator::reset_cruising_speed()
|
||||
_mission_cruising_speed_fw = -1.0f;
|
||||
}
|
||||
|
||||
void
|
||||
Navigator::reset_triplets()
|
||||
{
|
||||
_pos_sp_triplet.current.valid = false;
|
||||
_pos_sp_triplet.previous.valid = false;
|
||||
_pos_sp_triplet.next.valid = false;
|
||||
_pos_sp_triplet_updated = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
float
|
||||
Navigator::get_cruising_throttle()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user