ibaiGorordo / AWR1642-Read-Data-Python-MMWAVE-SDK-2

Python program to read and plot the data in real time from the AWR1642 and IWR1642 mmWave radar boards (Texas Instruments).
MIT License
136 stars 57 forks source link

Question about readData_AWR1642.py #42

Closed winnie1228 closed 2 years ago

winnie1228 commented 2 years ago

Hi, this is a question about readData_AWR1642.py. Sometimes there are many frames in one read, which means that the length of startIdx may be greater than 1. But why the only first frame is taken in the code. In addition, there is another place I don't understand: It's line 212(image below), Why is tlv_xyzQFormat calculated like this. 2021-11-25_105927 Do you have any suggestions? I'm waiting for your reply, thank you very much! Best wishes.

ibaiGorordo commented 2 years ago

Hi,

Yeah, if I wrote this repository again I would add a loop to read all the frames available. However, the data should be read as fast as possible to avoid an increasing of numbers in the queue. If you have that issue try reducing the sleep time.

As for the second question, I don't remember what the equation was, but looking at the code it shoudl be 2^x, where x = byteBuffer[idX] + byteBuffer[idX+1]*8, i.e. 2 byte big endian number.