nickovs / kld7

A Python driver for the K-LD7 radar module
9 stars 2 forks source link

Angle parameter hexadecimal payload #6

Open Ul-TiMe opened 4 months ago

Ul-TiMe commented 4 months ago

Hello, I am currently working on implementing new functions to make the configuration of the radar's parameters easier in a setup function. I can't find any documentation on the angle parameters payloads. Do you have any idea of the hexadecimal representation of the angle we want to set ? (positive or negative). Thanks in advance !

nickovs commented 4 months ago

Thanks for your interest. All the data that I have comes from the datasheet. I believe that each of the individual parameters are passed in the same format as in the full parameter block that is documented on page 16 of the datasheet, except that the values are always 4 bytes. It looks like the configuration for the angle threshold is a signed 1 bytes value in degrees in the configuration block, so I would expect it to be a signed 4 byte value on the individual command.

One way that you could confirm the format for the individual configuration commands is to try setting values and then read back the whole parameter block using the GRPS command, and see if the setting is what was expected, since the format of that block is more completely documents.