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

[RF] Use exponential backoff delay in initCC1101() #1874

Merged
merged 1 commit into from
Jan 20, 2024

Conversation

ianmtaylor1
Copy link
Contributor

Description:

In #1812, the function initCC1101() was created to poll getCC1101() until it returns true before using the CC1101 chip. A 500ms delay was put between polls.

In my experience, this delay is too long as the the chip is often ready very shortly after the first check. This change makes the function use exponential backoff to initially check quickly (16ms), then double the wait time until waiting the original 500ms.

A simpler change would be to just use a smaller constant delay, but exponential backoff is a good compromise in case there are instances where a longer delay is needed.

Checklist:

  • [ x ] The pull request is done against the latest development branch
  • [ x ] Only one feature/fix was added per PR and the code change compiles without warnings
  • [ x ] I accept the DCO.

@1technophile
Copy link
Owner

Thanks!

@1technophile 1technophile merged commit b2dbc2d into 1technophile:development Jan 20, 2024
75 checks passed
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