follow-target: correctly set "updated" flag

This commit is contained in:
Alessandro Simovic
2021-04-06 13:05:59 +02:00
committed by Daniel Agar
parent f1fca0939f
commit 5d9b3504f7

View File

@@ -103,11 +103,12 @@ void FollowTarget::on_active()
float dt_ms = 0;
if (_follow_target_sub.updated()) {
updated = true;
follow_target_s target_motion;
_target_updates++;
// save last known motion topic
// save last known motion topic for interpolation later
_previous_target_motion = _current_target_motion;