When sending 2 Bytes (a QByteArray) through a QTcpSocket, using the methods write(QByteArray) and readAll.
In the write side, the debugger shows the values:
-21 / 235
-112 / 144
-21 / 235
-112 / 144
To copy to clipboard, switch view to plain text mode
In the read side, the debugger shows the same values, as expected.
But When the same Bytes are sent through the QSerialPort, using the methods write(QByteArray) and readAll, a difference is noted.
In the write side, the debugger shows the values as above.
And in the read side, it shows:
107 'k'
16
107 'k'
16
To copy to clipboard, switch view to plain text mode
Why? How to convert from
107 'k'
16
107 'k'
16
To copy to clipboard, switch view to plain text mode
to
-21 / 235
-112 / 144
-21 / 235
-112 / 144
To copy to clipboard, switch view to plain text mode
?
Thanks for the attention
Bookmarks