diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-11-05 13:21:29 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-11-05 13:22:05 +0100 |
commit | 6da6fdaea31dd7b774c72f1b9dded06509d8f1de (patch) | |
tree | e5aaca988c221ed24c6f3a626a8b4129cec4138b | |
parent | 395d606ab74c25e3c107e59a6b0933de9bf79d20 (diff) |
fix build
-rw-r--r-- | tracker-hatire/ftnoir_tracker_hat_dialog.cpp | 6 | ||||
-rw-r--r-- | tracker-hatire/thread.cpp | 9 | ||||
-rw-r--r-- | tracker-hatire/thread.hpp | 2 | ||||
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt.h | 1 |
4 files changed, 13 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(); diff --git a/tracker-pt/ftnoir_tracker_pt.h b/tracker-pt/ftnoir_tracker_pt.h index fe4458f7..3b93eaf4 100644 --- a/tracker-pt/ftnoir_tracker_pt.h +++ b/tracker-pt/ftnoir_tracker_pt.h @@ -19,6 +19,7 @@ using namespace pt_types; #include "compat/timer.hpp" #include "cv/video-widget.hpp" +#include <QCoreApplication> #include <QThread> #include <QMutex> #include <QMutexLocker> |