summaryrefslogtreecommitdiffhomepage
path: root/tracker-hatire
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-hatire')
-rw-r--r--tracker-hatire/ftnoir_tracker_hat_dialog.cpp6
-rw-r--r--tracker-hatire/thread.cpp9
-rw-r--r--tracker-hatire/thread.hpp2
3 files changed, 12 insertions, 5 deletions
diff --git a/tracker-hatire/ftnoir_tracker_hat_dialog.cpp b/tracker-hatire/ftnoir_tracker_hat_dialog.cpp
index e12b85ca..6fb17361 100644
--- a/tracker-hatire/ftnoir_tracker_hat_dialog.cpp
+++ b/tracker-hatire/ftnoir_tracker_hat_dialog.cpp
@@ -17,7 +17,7 @@ dialog_hatire::dialog_hatire() : theTracker(nullptr), timer(this)
{
ui.setupUi(this);
- ui.label_version->setText(VER_FILEVERSION_STR);
+ ui.label_version->setText(tr("Version %1").arg("2.1.1"));
// make SerialPort list
ui.cbSerialPort->clear();
@@ -215,7 +215,7 @@ void dialog_hatire::register_tracker(ITracker *tracker)
//ui.btnCenter->setEnabled(true);
ui.btnReset->setEnabled(true);
ui.pteINFO->clear();
- ui.lab_vstatus->setText("HAT START");
+ ui.lab_vstatus->setText(tr("HAT START"));
last_time.start();
timer.start(250);
}
@@ -228,6 +228,6 @@ void dialog_hatire::unregister_tracker()
ui.btnZero->setEnabled(false);
//ui.btnCenter->setEnabled(false);
ui.btnReset->setEnabled(false);
- ui.lab_vstatus->setText("HAT STOPPED");
+ ui.lab_vstatus->setText(tr("HAT STOPPED"));
ui.lab_vtps->setText("");
}
diff --git a/tracker-hatire/thread.cpp b/tracker-hatire/thread.cpp
index 4f5feae5..f3c3f15c 100644
--- a/tracker-hatire/thread.cpp
+++ b/tracker-hatire/thread.cpp
@@ -24,7 +24,7 @@ void hatire_thread::sendcmd_impl(const QByteArray &cmd)
Log(logMess);
com_port.write(cmd);
if (!com_port.waitForBytesWritten(1000)) {
- emit serial_debug_info("TimeOut in writing CMD");
+ emit serial_debug_info_str(tr("Timeout during writing command"));
} else
{
Msg.append("\r\n");
@@ -42,7 +42,7 @@ void hatire_thread::sendcmd_impl(const QByteArray &cmd)
emit serial_debug_info(Msg);
#endif
} else {
- emit serial_debug_info("ComPort not open") ;
+ emit serial_debug_info_str(tr("COM port not open"));
}
}
#endif
@@ -145,6 +145,11 @@ void hatire_thread::run()
#endif
}
+void hatire_thread::serial_debug_info_str(const QString& str)
+{
+ serial_debug_info(str.toUtf8());
+}
+
serial_result hatire_thread::init_serial_port_impl()
{
#ifndef HATIRE_DEBUG_LOGFILE
diff --git a/tracker-hatire/thread.hpp b/tracker-hatire/thread.hpp
index dcdc13ee..38b5c5dd 100644
--- a/tracker-hatire/thread.hpp
+++ b/tracker-hatire/thread.hpp
@@ -56,6 +56,8 @@ class hatire_thread : public QThread
void run() override;
static inline QByteArray to_latin1(const QString& str) { return str.toLatin1(); }
+ void serial_debug_info_str(const QString& str);
+
private slots:
void on_serial_read();
void teardown_serial();