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

Don't allocate packet buf until connected #3

Merged
merged 2 commits into from
May 4, 2020

Conversation

dhalbert
Copy link
Contributor

This goes in hand with adafruit/circuitpython#2799. Don't allocate packet buffer until we're connected. At that time we know the MTU of the connection and therefore know how big the packet buffer can be.

@dhalbert dhalbert requested a review from tannewt April 30, 2020 03:39
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you!

@dhalbert dhalbert marked this pull request as ready for review May 4, 2020 19:03
@dhalbert dhalbert requested a review from tannewt May 4, 2020 19:07
@dhalbert
Copy link
Contributor Author

dhalbert commented May 4, 2020

  • While trying to use Stop() as a MIDI message, ran into one typo in the existing code and fixed it.
  • Add a one-second delay to the simpletest example. We need to wait for the connected device to start sending messages to us to have writes work properly. A 1-second delay was sufficient;0.5 seconds was not.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@tannewt tannewt merged commit d7cd19d into adafruit:master May 4, 2020
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request May 6, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 3.3.3 from 3.3.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#98 from brentru/update-simpletest

Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE_Cycling_Speed_and_Cadence to 1.1.2 from 1.1.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE_Cycling_Speed_and_Cadence#4 from dhalbert/defer-packet_size

Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE_Heart_Rate to 1.1.2 from 1.1.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE_Heart_Rate#8 from dhalbert/doc-and-pypi
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE_Heart_Rate#9 from dhalbert/defer-packet_size

Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE_iBBQ to 1.2.1 from 1.2.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE_iBBQ#2 from dhalbert/defer-packet_size

Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE_MIDI to 1.0.0 from 0.8.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE_MIDI#3 from dhalbert/delay-packet_size
  > build.yml: add black formatting check
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