summaryrefslogtreecommitdiffhomepage
path: root/proto-udp/ftnoir_protocol_ftn.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-01-03 00:09:09 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-01-16 07:48:20 +0100
commit545071e998806235442edda5f575ee61e836abe9 (patch)
tree45579d717361f24c6f4a06354f5836447e691771 /proto-udp/ftnoir_protocol_ftn.cpp
parent4766be01022d6de50f7b42647299860c2d9909b8 (diff)
cruft
Diffstat (limited to 'proto-udp/ftnoir_protocol_ftn.cpp')
-rw-r--r--proto-udp/ftnoir_protocol_ftn.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/proto-udp/ftnoir_protocol_ftn.cpp b/proto-udp/ftnoir_protocol_ftn.cpp
index 0eb79954..def3ebb1 100644
--- a/proto-udp/ftnoir_protocol_ftn.cpp
+++ b/proto-udp/ftnoir_protocol_ftn.cpp
@@ -18,15 +18,19 @@ udp::udp()
QObject::connect(s.b.get(), &bundle_::changed,
this, &udp::set_dest_address,
- Qt::QueuedConnection);
+ Qt::DirectConnection);
}
void udp::pose(const double *headpose) {
+ spinlock_guard l(spl);
+
outSocket.writeDatagram((const char *) headpose, sizeof(double[6]), dest_ip, dest_port);
}
void udp::set_dest_address()
{
+ spinlock_guard l(spl);
+
dest_port = (unsigned short)s.port;
dest_ip = QHostAddress((s.ip1.to<unsigned>() & 0xff) << 24 |
(s.ip2.to<unsigned>() & 0xff) << 16 |