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

[CC1101] Fix getRSSI data source #1121

Merged
merged 2 commits into from
Jun 12, 2024
Merged

[CC1101] Fix getRSSI data source #1121

merged 2 commits into from
Jun 12, 2024

Conversation

Shensd
Copy link
Contributor

@Shensd Shensd commented Jun 12, 2024

Class variable directModeEnabled is set to true by default and is only set to false when calling CC1101::receiveDirectAsync. This has the following effects:

  • When using asynchronous direct receive mode, -74.00 is always returned as RSSI data is not pulled from the RSSI register and class variable rawRSSI has never been changed from the default of 0.
  • When using the non-direct receive mode, RSSI is pulled from the RSSI register rather than being from the last packet's status.

I am not an expert in how the CC1101 works, but under my current understanding data should be pulled from the RSSI register when using either of the direct modes and from the status of the previous packet when using the non-direct mode.

Thank you for the wonderful library!

@jgromes
Copy link
Owner

jgromes commented Jun 12, 2024

You're right, this is indeed not correct. However, to completely fix this, we should also have this->directModeEnabled = false; in CC1101::setPacketMode. Could you add that so that the entire fix is in this PR? Thank you!

@Shensd
Copy link
Contributor Author

Shensd commented Jun 12, 2024

Good point, I've added the requested changes.

@jgromes jgromes merged commit a8b6c38 into jgromes:master Jun 12, 2024
30 checks passed
@jgromes
Copy link
Owner

jgromes commented Jun 12, 2024

All looks good now - merged, thank you very much for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants