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

Added class member cc1101::setBitRateTolerance with new error code -109 in typeDef.h #1151

Closed
wants to merge 4 commits into from

Conversation

OlliLausS
Copy link
Contributor

Changes in CC1101.cpp, CC1101.h and TypeDef.h

Function added to set Bitrate Tolerance in BSCFG register of CC1101
Added class member CC1101::setBitRateTolerance as proposed from jgromes after discussion.

Added new Error code "RADIOLIB_ERR_INVALID_BIT_RATE_TOLERANCE_VALUE" with value -109 to TypeDef.h

Tested with ESP32 and PlatformIO Environment.
Could not test on other platforms.

@jgromes
Copy link
Owner

jgromes commented Jul 7, 2024

Thank you for the contribution! It looks like cppcheck is reporting one minor issue, which is with the RADIOLIB_CHECK_RANGE macro being used. Since the value of brt can never be negative, you can replace the macro with just a simple if(brt >= 0x03), that should get rid of that problem.

Update of error handling
@OlliLausS OlliLausS closed this Jul 7, 2024
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