Skip to content

Incorrect SNR parsing in _read_packet of LoRa SX1262 driver #999

@hlym123

Description

@hlym123

🐛 Bug Description

micropython/lora/lora-sx126x/lora/sx126x.py, line: 599

In sx1262.py, the SNR value is parsed incorrectly in _read_packet. The driver currently does:

rx_packet.snr = pkt_status[2]  # Incorrect

pkt_status[2] is a signed 8-bit integer in two’s complement format (unit: dB × 4), and should be converted before use.

raw_snr = pkt_status[2]
if raw_snr >= 128:
    raw_snr -= 256  # convert to int8

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy