mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
follow-target: correctly set "updated" flag
This commit is contained in:
committed by
Daniel Agar
parent
f1fca0939f
commit
5d9b3504f7
@@ -103,11 +103,12 @@ void FollowTarget::on_active()
|
|||||||
float dt_ms = 0;
|
float dt_ms = 0;
|
||||||
|
|
||||||
if (_follow_target_sub.updated()) {
|
if (_follow_target_sub.updated()) {
|
||||||
|
updated = true;
|
||||||
follow_target_s target_motion;
|
follow_target_s target_motion;
|
||||||
|
|
||||||
_target_updates++;
|
_target_updates++;
|
||||||
|
|
||||||
// save last known motion topic
|
// save last known motion topic for interpolation later
|
||||||
|
|
||||||
_previous_target_motion = _current_target_motion;
|
_previous_target_motion = _current_target_motion;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user