summaryrefslogtreecommitdiffhomepage
path: root/tracker-s2bot
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-s2bot')
-rw-r--r--tracker-s2bot/ftnoir_tracker_s2bot.cpp15
-rw-r--r--tracker-s2bot/lang/de_DE.ts90
-rw-r--r--tracker-s2bot/lang/zh_CN.ts36
3 files changed, 119 insertions, 22 deletions
diff --git a/tracker-s2bot/ftnoir_tracker_s2bot.cpp b/tracker-s2bot/ftnoir_tracker_s2bot.cpp
index c1cb7d9b..98a299ca 100644
--- a/tracker-s2bot/ftnoir_tracker_s2bot.cpp
+++ b/tracker-s2bot/ftnoir_tracker_s2bot.cpp
@@ -27,6 +27,10 @@ static constexpr int add_cbx[] =
-180,
};
+#ifdef __GNUG__
+# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
void tracker_s2bot::run() {
int freq = s.freq;
if (freq <= 0)
@@ -34,7 +38,10 @@ void tracker_s2bot::run() {
timer.setInterval((int)(1000./freq));
timer.setSingleShot(false);
connect(&timer, &QTimer::timeout, [this] {
- auto reply = m_nam->get(QNetworkRequest(QUrl("http://localhost:17317/poll")));
+ QNetworkRequest req{QUrl("http://localhost:17317/poll")};
+ req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
+ auto* reply = m_nam->get(req);
+
connect(reply, &QNetworkReply::finished, [this, reply] {
if (reply->error() == QNetworkReply::NoError) {
//qDebug() << "Request submitted OK";
@@ -50,9 +57,9 @@ void tracker_s2bot::run() {
int order[] =
{
- clamp(s.idx_x, 0, 3),
- clamp(s.idx_y, 0, 3),
- clamp(s.idx_z, 0, 3),
+ std::clamp(*s.idx_x, 0, 3),
+ std::clamp(*s.idx_y, 0, 3),
+ std::clamp(*s.idx_z, 0, 3),
};
int add_indices[] = { s.add_yaw, s.add_pitch, s.add_roll, };
diff --git a/tracker-s2bot/lang/de_DE.ts b/tracker-s2bot/lang/de_DE.ts
new file mode 100644
index 00000000..4071d117
--- /dev/null
+++ b/tracker-s2bot/lang/de_DE.ts
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="de_DE">
+<context>
+ <name>UI_s2bot_dialog</name>
+ <message>
+ <source>Tracker settings</source>
+ <translation>Tracker-Einstellungen</translation>
+ </message>
+ <message>
+ <source>Update frequency (Hz)</source>
+ <translation>Aktualisierungsfrequenz (Hz)</translation>
+ </message>
+ <message>
+ <source>Axis order</source>
+ <translation>Achsen-Reihenfolge</translation>
+ </message>
+ <message>
+ <source>output yaw</source>
+ <translation>Gieren-Ausgabe</translation>
+ </message>
+ <message>
+ <source>input yaw</source>
+ <translation>Gieren-Eingabe</translation>
+ </message>
+ <message>
+ <source>input pitch</source>
+ <translation>Nicken-Eingabe</translation>
+ </message>
+ <message>
+ <source>input roll</source>
+ <translation>Rollen-Eingabe</translation>
+ </message>
+ <message>
+ <source>input bearing</source>
+ <translation>Peilung-Eingabe</translation>
+ </message>
+ <message>
+ <source>output pitch</source>
+ <translation>Nicken-Ausgabe</translation>
+ </message>
+ <message>
+ <source>output roll</source>
+ <translation>Rollen-Ausgabe</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>meta_s2bot</name>
+ <message>
+ <source>S2Bot receiver</source>
+ <translation>S2Bot-Empfänger</translation>
+ </message>
+</context>
+</TS>
diff --git a/tracker-s2bot/lang/zh_CN.ts b/tracker-s2bot/lang/zh_CN.ts
index babca884..f9cc2a4b 100644
--- a/tracker-s2bot/lang/zh_CN.ts
+++ b/tracker-s2bot/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>UI_s2bot_dialog</name>
<message>
@@ -9,27 +9,27 @@
</message>
<message>
<source>Update frequency (Hz)</source>
- <translation type="unfinished"></translation>
+ <translation>刷新率(Hz)</translation>
</message>
<message>
<source>Axis order</source>
- <translation type="unfinished"></translation>
+ <translation>输出重映射</translation>
</message>
<message>
<source>output yaw</source>
- <translation type="unfinished"></translation>
+ <translation>输出的航向</translation>
</message>
<message>
<source>input yaw</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">输入航向</translation>
</message>
<message>
<source>input pitch</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">输入俯仰</translation>
</message>
<message>
<source>input roll</source>
- <translation type="unfinished"></translation>
+ <translation type="unfinished">输入滚转</translation>
</message>
<message>
<source>input bearing</source>
@@ -37,47 +37,47 @@
</message>
<message>
<source>output pitch</source>
- <translation type="unfinished"></translation>
+ <translation>输出的俯仰</translation>
</message>
<message>
<source>output roll</source>
- <translation type="unfinished"></translation>
+ <translation>输出的滚转</translation>
</message>
<message>
<source>Add to axis</source>
- <translation type="unfinished"></translation>
+ <translation>添加到轴</translation>
</message>
<message>
<source>yaw</source>
- <translation type="unfinished"></translation>
+ <translation>航向</translation>
</message>
<message>
<source>0</source>
- <translation type="unfinished"></translation>
+ <translation></translation>
</message>
<message>
<source>+90</source>
- <translation type="unfinished"></translation>
+ <translation></translation>
</message>
<message>
<source>-90</source>
- <translation type="unfinished"></translation>
+ <translation></translation>
</message>
<message>
<source>+180</source>
- <translation type="unfinished"></translation>
+ <translation></translation>
</message>
<message>
<source>-180</source>
- <translation type="unfinished"></translation>
+ <translation></translation>
</message>
<message>
<source>pitch</source>
- <translation type="unfinished"></translation>
+ <translation>俯仰</translation>
</message>
<message>
<source>roll</source>
- <translation type="unfinished"></translation>
+ <translation>滚转</translation>
</message>
</context>
<context>