Skip to content

Enable CRC by default #63

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

Merged
merged 3 commits into from
Jul 19, 2021
Merged

Enable CRC by default #63

merged 3 commits into from
Jul 19, 2021

Conversation

jerryneedell
Copy link
Contributor

@jerryneedell jerryneedell commented Jul 18, 2021

implements issue #62 enable CRC by default for compatibility with Arduino (RadioHead)
This will have minimal impact on existing CircuitPython to CircuitPython communication because the CircuitPython library allows the "explicit" header setting to determine if the CRC is used. The radio uses an additional header to determine if the CRC is present. The RadioHead library has an extra check to verify that the transmitter and received have matching CRC state. In Circuit Python, even if one side has the CRC enabled and the other does not, the packets will be received. The internal header determines if the CRC is present. Exiting deployments that do not have the CRC enabled will still work as before.

Tested between a Raspberry Pi and umfeathers2 (CP to CP) and between a Raspberry Pi and an Arduino Uno (CP to Radiohead)

The changes to the examples were to remove the explicit enable of the CRC since it is done by default.
To disable the CRC either:
1)disable it when instantiating the device (add crc=False) to the kwarg list
2)change the setting via the enable_crc property (rfm9x.enable_crc=False)

I did not test each of the examples, the changes were the same in all examples modified.

@jerryneedell jerryneedell requested a review from a team July 18, 2021 19:10
@brentru brentru merged commit 4490961 into adafruit:main Jul 19, 2021
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jul 20, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground to 4.4.0 from 4.3.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_CircuitPlayground#106 from kattni/keypad-gamepad
  > Moved CI to Python 3.7
  > Added help text and problem matcher
  > Added pull request template

Updating https://github.com/adafruit/Adafruit_CircuitPython_DotStar to 2.1.0 from 2.0.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_DotStar#56 from kattni/pixelbuf-update
  > Moved default branch to main
  > Moved CI to Python 3.7

Updating https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel to 6.2.0 from 6.1.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_NeoPixel#115 from kattni/pixelbuf-update
  > Moved default branch to main
  > Moved CI to Python 3.7

Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM9x to 2.2.0 from 2.1.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_RFM9x#63 from jerryneedell/jerryn_crc
  > Moved default branch to main
  > Moved CI to Python 3.7
  > Added help text and problem matcher
  > Added pull request template
  > "Increase duplicate code check threshold "

Updating https://github.com/adafruit/Adafruit_CircuitPython_MagTag to 2.1.1 from 2.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_MagTag#63 from makermelissa/main
  > Moved CI to Python 3.7
  > Added help text and problem matcher
  > Added pull request template
@jerryneedell jerryneedell deleted the jerryn_crc branch July 21, 2021 11:24
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