Skip to content

SNR calculation error #18

@czm0x4C

Description

@czm0x4C

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions