Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

32-bit "ASCII/Unicode" values, sent over UART, to Int



  • I have a device that is sending a continuous stream of data. Packets are in the form of 28 bytes, however it needs to be interpreted as 7 32 bit integers. I have a parsing algorithm that takes in the 28 bytes and organizes them into an array where each index holds the corresponding 4 bytes. But I cant correctly interpret them a 32 bit integers. I've tried parseInt() and some other functions, but they either result in NaN or 0.
    I'm trying to keep all my code in QML and not attempt to edit the C++ libraries I'm using.

    How can I interpret 4 bytes/chars as a 32 bit int in QML?


Log in to reply