Either way a solution not using Qt, C or C++ is useless □ Note: I'm using Qt, so if one could find a solution implementing QByteArray or another Qt friendly code, I'll be glad. My question, therefore, is: how do I go from the integer result to the double hex result needed? I tried a couple of options, with no success. For example, for "01" (1 byte), I was supposed to get a "7E80" while I get "21695", and I'm being unable to do some sort of conversion from this to that hex data. The problem is that I'm supposed to get two hex bytes as CRC numbers while this functions returns a integer value. Note, this number has low and high bytes swapped, so use it accordingly (or swap bytes) For that, I need to calculate the two CRC byte at the end of the string of bytes, but I'm being incapable of doing this. I'm implementing a software where I read and write data in Modbus RTU protocolo via serial.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |