llcc68 icon indicating copy to clipboard operation
llcc68 copied to clipboard

SNR calculation error

Open czm0x4C opened this issue 5 months ago • 1 comments

Version

main

Describe the bug

When I was using the LLCC68 module, the distance between the master and slave modules was quite far. During the calculation of the SNR value, abnormal values appeared. The current value should be a negative number (close to -20), but the calculated SNR value is a positive number (45 to 48).

Reproduce

When the signals between the modules are poor, calculate the SNR value.

Expected behavior

When the signal is very poor, the calculated value of SNR should be a negative number.

Additional context

After reading the LLCC68 data manual, I suspect that there is an error in the calculation performed by the GetPacketStatus register with the value of 0x14 when reading the data. The original text of the manual reads: "Estimate the SNR of the last received packet in two's complement format and multiply it by 4. The actual SNR in dB = SnrPkt / 4." The SNR calculation value here still uses uint8_t, but in reality, int8_t should be used instead.

czm0x4C avatar Sep 06 '25 19:09 czm0x4C

Thank you for your feedback. We have fixed this bug and you can git pull the newest version v1.0.10.

libdriver avatar Sep 07 '25 04:09 libdriver