From 4f61fe1d9f07262426c5c3b431c9a27958f22da5 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 10 Jun 2017 15:48:52 +0200 Subject: logic/tracker: fix typo Was sending zero pose to proto. --- logic/tracker.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'logic/tracker.cpp') diff --git a/logic/tracker.cpp b/logic/tracker.cpp index a7b19a48..1132affe 100644 --- a/logic/tracker.cpp +++ b/logic/tracker.cpp @@ -423,23 +423,21 @@ void Tracker::run() backlog_time += ns(elapsed_nsecs - const_sleep_ms); - const int sleep_time_ms = iround(std::fmax(0., - (time_cast(clamp(const_sleep_ms - backlog_time, - ms_::zero(), ms_(50)))).count())); + const int sleep_time_ms = iround((time_cast(clamp(const_sleep_ms - backlog_time, + ms_::zero(), ms_(50)))) + .count()); portable::sleep(sleep_time_ms); + } - { - // filter may inhibit exact origin - Pose p; - libs.pProtocol->pose(p); - } + // filter may inhibit exact origin + Pose p; + libs.pProtocol->pose(p); - for (int i = 0; i < 6; i++) - { - m(i).spline_main.set_tracking_active(false); - m(i).spline_alt.set_tracking_active(false); - } + for (int i = 0; i < 6; i++) + { + m(i).spline_main.set_tracking_active(false); + m(i).spline_alt.set_tracking_active(false); } } -- cgit v1.2.3