summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-06-10 15:48:52 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-06-10 15:48:52 +0200
commit4f61fe1d9f07262426c5c3b431c9a27958f22da5 (patch)
treecaa4b2f294568e95ddabb9f8d94ebf4ceb3b8bf3
parent8a6f73b3a6ca555da750cecf9565d2feb36f5303 (diff)
logic/tracker: fix typo
Was sending zero pose to proto.
-rw-r--r--logic/tracker.cpp24
1 files changed, 11 insertions, 13 deletions
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<ms>(clamp(const_sleep_ms - backlog_time,
- ms_::zero(), ms_(50)))).count()));
+ const int sleep_time_ms = iround((time_cast<ms>(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);
}
}