:bump:
Guys I know this to be one the dumbest threads ever...
However... I'm baffled by it and it's interfering in sending data.
Any pointers highly appreciated.
BR,
Pedro.
:bump:
Guys I know this to be one the dumbest threads ever...
However... I'm baffled by it and it's interfering in sending data.
Any pointers highly appreciated.
BR,
Pedro.
You asking printf to treat an integer as a qint8, so what do you expect? Anything more than 0x7F will always be negative number.
Maybe this is what you meant:
Qt Code:
for (i = 0; i < byteArray.size(); i++) { printf("%02X\r\n", (quint8) byteArray[i] ); }To copy to clipboard, switch view to plain text mode
Note the quint8 instead of qint8
Done that my friend.
data still gets 0xFFFFFFA1 in the stream ...
Thanks.
Actually in the stream? Or just in the output?
Your putting 3 bytes into a QByteArray, so it can not be putting 0xFFFFFFA1 in the stream. Have you tried copying the QByteArray to a standard quint8 array and viewing the memory in the debugger?
Bookmarks