From 1c9e60221a52e9419780e81aedfe076ad157d014 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 20 Sep 2014 12:16:26 +0200 Subject: reformat only --- .../ftnoir_tracker_freepie-udp.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp') diff --git a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp index 811a08d9..3a63df6e 100644 --- a/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp +++ b/ftnoir_tracker_freepie-udp/ftnoir_tracker_freepie-udp.cpp @@ -21,27 +21,28 @@ void TrackerImpl::run() { float rot[6]; struct { float pad[9]; - float rot[6]; + float rot[6]; } raw_rot; }; } data; - + enum F { flag_Raw = 1 << 0, flag_Orient = 1 << 1, Mask = flag_Raw | flag_Orient }; - while (1) { + while (1) { if (should_quit) break; { float* orient = nullptr; - - while (sock.hasPendingDatagrams()) { + + while (sock.hasPendingDatagrams()) + { data = decltype(data){0,0, 0,0,0}; (void) sock.readDatagram(reinterpret_cast(&data), sizeof(data)); - + int flags = data.flags & F::Mask; switch (flags) { @@ -62,14 +63,14 @@ void TrackerImpl::run() { pose[Yaw + i] = orient[i]; } } - usleep(4000); - } + usleep(4000); + } } void TrackerImpl::StartTracker(QFrame*) { (void) sock.bind(QHostAddress::Any, (int) s.port, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint); - start(); + start(); } void TrackerImpl::GetHeadPoseData(double *data) -- cgit v1.2.3