summaryrefslogtreecommitdiffhomepage
path: root/tracker-udp
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-udp')
-rw-r--r--tracker-udp/ftnoir_tracker_udp.cpp24
-rw-r--r--tracker-udp/ftnoir_tracker_udp.h7
-rw-r--r--tracker-udp/lang/de_DE.ts65
-rw-r--r--tracker-udp/lang/nl_NL.ts7
-rw-r--r--tracker-udp/lang/ru_RU.ts7
-rw-r--r--tracker-udp/lang/stub.ts7
-rw-r--r--tracker-udp/lang/zh_CN.ts9
7 files changed, 112 insertions, 14 deletions
diff --git a/tracker-udp/ftnoir_tracker_udp.cpp b/tracker-udp/ftnoir_tracker_udp.cpp
index 318683f7..f1f9f033 100644
--- a/tracker-udp/ftnoir_tracker_udp.cpp
+++ b/tracker-udp/ftnoir_tracker_udp.cpp
@@ -44,16 +44,20 @@ void udp::run()
}
while (sock.hasPendingDatagrams());
- if (ok &&
- progn(
- for (unsigned i = 0; i < 6; i++)
+ if (ok)
+ {
+ for (unsigned i = 0; i < 6; i++)
+ {
+ int val = std::fpclassify(last_recv_pose2[i]);
+ if (val == FP_NAN || val == FP_INFINITE)
{
- int val = std::fpclassify(last_recv_pose2[i]);
- if (val == FP_NAN || val == FP_INFINITE)
- return false;
+ ok = false;
+ break;
}
- return true;
- ))
+ }
+ }
+
+ if (ok)
{
for (unsigned i = 0; i < 6; i++)
last_recv_pose[i] = last_recv_pose2[i];
@@ -66,7 +70,7 @@ void udp::run()
module_status udp::start_tracker(QFrame*)
{
- if (!sock.bind(QHostAddress::Any, quint16(s.port), QUdpSocket::DontShareAddress))
+ if (!sock.bind(QHostAddress::Any, quint16(s.port), QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint))
return error(tr("Can't bind socket -- %1").arg(sock.errorString()));
sock.moveToThread(this);
@@ -103,4 +107,4 @@ void udp::data(double *data)
}
-OPENTRACK_DECLARE_TRACKER(udp, dialog_udp, udpDll)
+OPENTRACK_DECLARE_TRACKER(udp, dialog_udp, udp_receiver_dll)
diff --git a/tracker-udp/ftnoir_tracker_udp.h b/tracker-udp/ftnoir_tracker_udp.h
index bccb2891..86e82dc6 100644
--- a/tracker-udp/ftnoir_tracker_udp.h
+++ b/tracker-udp/ftnoir_tracker_udp.h
@@ -51,10 +51,11 @@ private slots:
void doCancel();
};
-class udpDll : public Metadata
+class udp_receiver_dll : public Metadata
{
-public:
- QString name() { return otr_tr("UDP over network"); }
+ Q_OBJECT
+
+ QString name() { return tr("UDP over network"); }
QIcon icon() { return QIcon(":/images/opentrack.png"); }
};
diff --git a/tracker-udp/lang/de_DE.ts b/tracker-udp/lang/de_DE.ts
new file mode 100644
index 00000000..a609cd25
--- /dev/null
+++ b/tracker-udp/lang/de_DE.ts
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="de_DE">
+<context>
+ <name>UICFTNClientControls</name>
+ <message>
+ <source>UDP tracker settings</source>
+ <translation>UDP-Tracker-Einstellungen</translation>
+ </message>
+ <message>
+ <source>Port</source>
+ <translation>Port</translation>
+ </message>
+ <message>
+ <source>Add to axis</source>
+ <translation>Zur Achse hinzufügen</translation>
+ </message>
+ <message>
+ <source>yaw</source>
+ <translation>Gieren</translation>
+ </message>
+ <message>
+ <source>0</source>
+ <translation>0</translation>
+ </message>
+ <message>
+ <source>+90</source>
+ <translation>+90</translation>
+ </message>
+ <message>
+ <source>-90</source>
+ <translation>-90</translation>
+ </message>
+ <message>
+ <source>+180</source>
+ <translation>+180</translation>
+ </message>
+ <message>
+ <source>-180</source>
+ <translation>-180</translation>
+ </message>
+ <message>
+ <source>pitch</source>
+ <translation>Nicken</translation>
+ </message>
+ <message>
+ <source>roll</source>
+ <translation>Rollen</translation>
+ </message>
+</context>
+<context>
+ <name>udp</name>
+ <message>
+ <source>Can&apos;t bind socket -- %1</source>
+ <translation>Kann nicht an Socket binden -- %1</translation>
+ </message>
+</context>
+<context>
+ <name>udp_receiver_dll</name>
+ <message>
+ <source>UDP over network</source>
+ <translation>UDP über Netzwerk</translation>
+ </message>
+</context>
+</TS>
diff --git a/tracker-udp/lang/nl_NL.ts b/tracker-udp/lang/nl_NL.ts
index a7e31195..c15e8f93 100644
--- a/tracker-udp/lang/nl_NL.ts
+++ b/tracker-udp/lang/nl_NL.ts
@@ -55,4 +55,11 @@
<translation type="unfinished"></translation>
</message>
</context>
+<context>
+ <name>udp_receiver_dll</name>
+ <message>
+ <source>UDP over network</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
</TS>
diff --git a/tracker-udp/lang/ru_RU.ts b/tracker-udp/lang/ru_RU.ts
index 5e763652..1b401dc4 100644
--- a/tracker-udp/lang/ru_RU.ts
+++ b/tracker-udp/lang/ru_RU.ts
@@ -55,4 +55,11 @@
<translation type="unfinished"></translation>
</message>
</context>
+<context>
+ <name>udp_receiver_dll</name>
+ <message>
+ <source>UDP over network</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
</TS>
diff --git a/tracker-udp/lang/stub.ts b/tracker-udp/lang/stub.ts
index 6b8cddea..0ebbf95f 100644
--- a/tracker-udp/lang/stub.ts
+++ b/tracker-udp/lang/stub.ts
@@ -55,4 +55,11 @@
<translation type="unfinished"></translation>
</message>
</context>
+<context>
+ <name>udp_receiver_dll</name>
+ <message>
+ <source>UDP over network</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
</TS>
diff --git a/tracker-udp/lang/zh_CN.ts b/tracker-udp/lang/zh_CN.ts
index 6b8cddea..6730c9b8 100644
--- a/tracker-udp/lang/zh_CN.ts
+++ b/tracker-udp/lang/zh_CN.ts
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.1">
+<TS version="2.1" language="zh_CN">
<context>
<name>UICFTNClientControls</name>
<message>
@@ -55,4 +55,11 @@
<translation type="unfinished"></translation>
</message>
</context>
+<context>
+ <name>udp_receiver_dll</name>
+ <message>
+ <source>UDP over network</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
</TS>