Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[treewide] lora: use int16_t for RSSI value [backport 2022.01] #17527

Merged

Conversation

jia200x
Copy link
Member

@jia200x jia200x commented Jan 18, 2022

Backport of #17497

Contribution description

The RSSI values reported by LoRa transceiver can be less than -127.
Therefore, int8_t is not enough. This commit defines the RSSI of
netdev_lora_rx_info as int16_t and adapt the drivers accordingly
(sx126x, sx127x).

BTW, the sx126x was writing an int16_t into an int8_t. 🤷‍♂️. It's indirectly fixed by this commit.

Testing procedure

  • Check that the RSSI values reported by the LoRa radios (sx126x, sx127x) are right (negative values, starting from around -140). Use tests/driver_sx127x and test/drivers_sx126x for that.

Issues/PRs references

Fixes #17451

The RSSI values reported by LoRa transceiver can be less than -127.
Therefore, `int8_t` is not enough. This commit defines the RSSI of
`netdev_lora_rx_info` as `int16_t` and adapt the drivers accordingly
(sx126x, sx127x).

(cherry picked from commit 9955a35)
@jia200x jia200x requested a review from aabadie as a code owner January 18, 2022 10:05
@jia200x jia200x added Area: drivers Area: Device drivers Area: LoRa Area: LoRa radio support Area: network Area: Networking Area: pkg Area: External package ports Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Jan 18, 2022
@aabadie aabadie enabled auto-merge January 18, 2022 10:11
Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK!

@aabadie aabadie merged commit 5e99374 into RIOT-OS:2022.01-branch Jan 18, 2022
@emmanuelsearch emmanuelsearch added this to the Release 2022.01 milestone Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers Area: LoRa Area: LoRa radio support Area: network Area: Networking Area: pkg Area: External package ports Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants