Closed federicoprimomo closed 1 year ago
Thanks for the report. It looks like it probably fails for MAAN and ANTH too. I believe the bug is in line 234 of device.py which should have a lower-case i
instead of an upper case I
as the pack type.
If you have the ability to test this change to make sure that the fix works it would be most helpful, since I don't have access to a K-DL7 module at the moment.
What is the transceiver chipset used in this module. Can you share the internal schematic if available with you
@nickovs I have tested the change and the fix works
@nickovs I also got an error while feeding (legal) negative values: radar.params.MIAN = -90 radar.params.ANTH = -45 As you suggested, changing line 234 of device.py to lower-case i instead of an upper case I, solves the problem.
Error was: Traceback (most recent call last): File "/home/projects/radar/./radarsetup.py", line 17, in
radar.params.ANTH = -45... File "/home/projects/radar/nickovskld7/device.py", line 234, in _send_command data = struct.pack("<I", data) struct.error: argument out of range
Thanks for the confirmation. I will update the code and push a new version to PyPI.
This is fixed by commit https://github.com/nickovs/kld7/commit/c94c83e1eddeb212367247f3c4f2b2dadddb0419 and the updated code is available as version 0.2.1.
I get an error when I try to set the MIAN to a value under 0, example -90. I got the error struct.error: argument out of range