summaryrefslogtreecommitdiffhomepage
path: root/logic/tracker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/tracker.cpp')
-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);
}
}