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
137 stars 57 forks source link

Configuration parameters read as ints although they might be floats #1

Closed mleppanen closed 5 years ago

mleppanen commented 5 years ago

For example startFreq expects an int on the cfg file, but it might be a float.

ivarvanwooning commented 5 years ago

The solution is to change: startFreq = int(splitWords[2]) into startFreq = int(float(splitWords[2])).

The config file has some text, such as '62.00'. It can't directly convert this string to an integer. By first converting the string to a float and then converting the float to an int, the problem should be fixed. Don't forget to do this for the other variables:

startFreq = int(float(splitWords[2])) idleTime = int(splitWords[3]) rampEndTime = float(splitWords[5]) freqSlopeConst = float(splitWords[8]) numAdcSamples = int(splitWords[10])

ibaiGorordo commented 5 years ago

I have corrected the function with Ivar's code. Thank you for letting me know.