cpu/cc2538: fix RSSI computation#22464
Conversation
- use `int` instead of `int8_t` to avoid loosing precision - the offset is already negative, so add it instead of subtracting it.
AnnsAnns
left a comment
There was a problem hiding this comment.
One could send to an CC2538 board with another board next to it using different TX power settings and check if the RSSI is reasonable.
This sounds like a "I will simply trust maribu on this one" situation 😛
Hmm, we might want to actually test this. I just guessed the change from the code context. (So basically did Vibe-code this change, just with the guessing done by me rather than a GPU.) The code in |
Agentic vibe based merging, Microsoft better pay me one trillion for that |
Co-authored-by: Karl Fessel <karl.fessel@gmail.com>
Co-authored-by: Karl Fessel <karl.fessel@gmail.com>
|
int8_t rssi_val is read from the device so if the signed 8 bit value ( rage [-128 127] is bigger than −247) is that correct? might that register be unsigned? |
kfessel
left a comment
There was a problem hiding this comment.
unobfuscated code made flawes visible
see the suggestion in other comment - thread
Co-authored-by: Karl Fessel <karl.fessel@gmail.com>
|
squash is missing |
Contribution description
intinstead ofint8_tto avoid loosing precisionTesting procedure
One could send to an CC2538 board with another board next to it using different TX power settings and check if the RSSI is reasonable.
Issues/PRs references
Split out of #22463
Declaration of AI-Tools / LLMs usage:
AI-Tools / LLMs that were used are: