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

Update uart.rst example to read all available characters #1031

Merged
merged 1 commit into from
Feb 28, 2021

Conversation

RoganDawes
Copy link
Contributor

Process ALL available data to avoid data loss if the rx_buffer_size would otherwise be overrun.

Description:

Processing only a single character per loop() call runs the risk of overrunning the rx_buffer_size. Processing all available() data in a single loop invocation helps to avoid this.

Related issue (if applicable): fixes

Pull request in esphome with YAML changes (if applicable): esphome/esphome#

Checklist:

  • Branch: next is for changes and new documentation that will go public with the next ESPHome release. Fixes, changes and adjustments for the current release should be created against current.
  • Link added in /index.rst when creating new documents for new components or cookbook.

Process ALL available characters to avoid data loss if the rx_buffer_size would otherwise be overrun.
@jesserockz jesserockz changed the title Update uart.rst Update uart.rst example to read all available characters Feb 28, 2021
@jesserockz jesserockz merged commit 966cb7b into esphome:current Feb 28, 2021
This was referenced Mar 22, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants