summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2021-03-26 11:30:52 +0100
committerKarsten Heimrich <karsten.heimrich@qt.io>2021-03-30 10:50:23 +0200
commit858c649f606434e38f006eb4fe8e50d303b68614 (patch)
treeb7c12873e4dc0fd2a1ed8331fa1890a8d8aa20a6
parent2ba52210ebafde1077d36fc913afb65759a8cb62 (diff)
Fix and or clarify some debug output/comments
Change-Id: I1ae6493ef4aa70859adebda4cfe63dac2f8e6795 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
-rw-r--r--src/serialbus/qmodbusclient.cpp2
-rw-r--r--src/serialbus/qmodbustcpclient_p.h2
-rw-r--r--src/serialbus/qmodbustcpserver_p.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/serialbus/qmodbusclient.cpp b/src/serialbus/qmodbusclient.cpp
index 8a065d2..4ca6b37 100644
--- a/src/serialbus/qmodbusclient.cpp
+++ b/src/serialbus/qmodbusclient.cpp
@@ -491,7 +491,7 @@ bool QModbusClientPrivate::collateBytes(const QModbusPdu &response,
if ((response.dataSize() - 1) != byteCount)
return false;
- // byte count needs to be odd to match full registers
+ // byte count needs to be even to match full registers
if (byteCount % 2 != 0)
return false;
diff --git a/src/serialbus/qmodbustcpclient_p.h b/src/serialbus/qmodbustcpclient_p.h
index cdac792..51cd4be 100644
--- a/src/serialbus/qmodbustcpclient_p.h
+++ b/src/serialbus/qmodbustcpclient_p.h
@@ -106,7 +106,7 @@ public:
while (!responseBuffer.isEmpty()) {
// can we read enough for Modbus ADU header?
if (responseBuffer.size() < mbpaHeaderSize) {
- qCDebug(QT_MODBUS_LOW) << "(TCP client) Modbus ADU not complete";
+ qCDebug(QT_MODBUS_LOW) << "(TCP client) MBPA header too short. Waiting for more data.";
return;
}
diff --git a/src/serialbus/qmodbustcpserver_p.h b/src/serialbus/qmodbustcpserver_p.h
index 26b1b55..3e8ca62 100644
--- a/src/serialbus/qmodbustcpserver_p.h
+++ b/src/serialbus/qmodbustcpserver_p.h
@@ -157,7 +157,7 @@ public:
+ buffer->toHex();
if (buffer->size() < mbpaHeaderSize) {
- qCDebug(QT_MODBUS) << "(TCP server) ADU too short. Waiting for more data.";
+ qCDebug(QT_MODBUS) << "(TCP server) MBPA header too short. Waiting for more data.";
return;
}