Hello,
I am new to QT on Linux. I've been a .NET programmer and now working on Beaglebone Black. I'm using C++ to communicate with a motor controller which requires a command's parameter to be sent one byte at a time.
My function receives an int (decimal) and this needs to be converted to Hex and then sent to another function one byte at a time.
For example,
Function parameter -> 16000 (decimal)
convert it to Hex -> 3E80
format the number as 000000 -> 003E80
now this number must be sent one byte at a time so it must be broken down like this:
char x[3];
x[0] = 0x00;
x[1] = 0x3E;
x[2] = 0x80;
How can I achieve this? Sorry I'm a real newbie in C++/QT.
Thanks
Bookmarks