summaryrefslogtreecommitdiffhomepage
path: root/tracker-hatire/thread.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-09-25 14:05:30 +0200
committerStanislaw Halik <sthalik@misaki.pl>2021-09-26 11:22:51 +0200
commitadd1d5d0b01078a3a99167a65e691e2ee647f398 (patch)
treeda7f8a98a845545358ae5f723ada9d3f9fc9409c /tracker-hatire/thread.cpp
parentd0a3b0a85c50c7c746b8ef17af19f4e88dfdf895 (diff)
tracker/hatire: fix warnings
Diffstat (limited to 'tracker-hatire/thread.cpp')
-rw-r--r--tracker-hatire/thread.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/tracker-hatire/thread.cpp b/tracker-hatire/thread.cpp
index 4938e77f..533aaebf 100644
--- a/tracker-hatire/thread.cpp
+++ b/tracker-hatire/thread.cpp
@@ -71,7 +71,7 @@ void hatire_thread::Log(const QString& message)
{
QTextStream out(&flDiagnostics);
QString milliSeconds;
- milliSeconds = QString("%1").arg(QTime::currentTime().msec(), 3, 10, QChar('0'));
+ milliSeconds = QStringLiteral("%1").arg(QTime::currentTime().msec(), 3, 10, QChar('0'));
// We have a file
out << QTime::currentTime().toString() << "." << milliSeconds << ": " << message << "\r\n";
flDiagnostics.close();
@@ -111,7 +111,7 @@ void hatire_thread::teardown_serial()
{
QByteArray msg;
Log("Tracker shut down");
- com_port.write(to_latin1(s.CmdStop));
+ com_port.write(s.CmdStop->toUtf8());
if (!com_port.waitForBytesWritten(1000))
{
emit serial_debug_info("TimeOut in writing CMD");
@@ -120,7 +120,7 @@ void hatire_thread::teardown_serial()
{
msg.append("\r\n");
msg.append("SEND '");
- msg.append(s.CmdStop);
+ msg.append(s.CmdStop->toUtf8());
msg.append("'\r\n");
}
emit serial_debug_info(msg);
@@ -200,7 +200,7 @@ serial_result hatire_thread::init_serial_port_impl()
}
Log(tr("Waiting on init"));
qDebug() << QTime::currentTime() << " HAT send INIT ";
- sendcmd_str(s.CmdInit);
+ emit sendcmd_str(s.CmdInit);
// Wait init MPU sequence
for (int i = 1; i <= s.DelayStart; i+=50)
{
@@ -208,7 +208,7 @@ serial_result hatire_thread::init_serial_port_impl()
}
// Send START cmd to IMU
qDebug() << QTime::currentTime() << " HAT send START ";
- sendcmd_str(s.CmdStart);
+ emit sendcmd_str(s.CmdStart);
// Wait start MPU sequence
for (int i = 1; i <=s.DelaySeq; i+=50)
@@ -241,13 +241,13 @@ void hatire_thread::serial_info_impl()
if (com_port.isOpen())
{
msg.append("\r\n");
- msg.append(com_port.portName());
+ msg.append(com_port.portName().toUtf8());
msg.append("\r\n");
msg.append("BAUDRATE :");
- msg.append(QString::number(com_port.baudRate()));
+ msg.append(QString::number(com_port.baudRate()).toLatin1());
msg.append("\r\n");
msg.append("DataBits :");
- msg.append(QString::number(com_port.dataBits()));
+ msg.append(QString::number(com_port.dataBits()).toLatin1());
msg.append("\r\n");
msg.append("Parity :");