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

feat(uart): uart break example improvement #10525

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

SuGlider
Copy link
Collaborator

Description of Change

Prints the received byte as HEXA and CHAR in order to allow the user to see why there is 1 extra char (0x00) when BREAK is received.

Targets 3.0.x and 3.1.x

Tests scenarios

Using P4/S3 with libraries/ESP32/examples/Serial/OnReceiveError_BREAK_Demo/OnReceiveError_BREAK_Demo.ino

Output:

================================
Test Case #3 BREAK at END
================================

Testing onReceive for receiving 26 bytes at 9600 baud, using RX FIFO Full = 5.
onReceive is called on both FIFO Full and RX Timeout events.
BREAK event will be sent at the END of the 26 bytes
onReceive Callback:: There are 5 bytes available: {0x41='A' 0x42='B' 0x43='C' 0x44='D' 0x45='E'}
onReceive Callback:: There are 5 bytes available: {0x46='F' 0x47='G' 0x48='H' 0x49='I' 0x4a='J'}
onReceive Callback:: There are 10 bytes available: {0x4b='K' 0x4c='L' 0x4d='M' 0x4e='N' 0x4f='O' 0x50='P' 0x51='Q' 0x52='R' 0x53='S' 0x54='T'}
onReceive Callback:: There are 7 bytes available: {0x55='U' 0x56='V' 0x57='W' 0x58='X' 0x59='Y' 0x5a='Z' 0x0=''}

It has sent 26 bytes from Serial1 TX to Serial1 RX
onReceive() has read a total of 27 bytes

Related links

None

prints the HEXA and CHAR in order to allow the user to see why there is 1 extra char (0x00) when BREAK is received.
@SuGlider SuGlider added Type: Example Issue is related to specific example. Peripheral: UART labels Oct 25, 2024
@SuGlider SuGlider added this to the 3.1.0-RC2 milestone Oct 25, 2024
@SuGlider SuGlider self-assigned this Oct 25, 2024
Copy link
Contributor

github-actions bot commented Oct 25, 2024

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message "feat(uart): uart break example improvement ":
    • body's lines must not be longer than 100 characters

Please fix these commit messages - here are some basic tips:

  • follow Conventional Commits style
  • correct format of commit message should be: <type/action>(<scope/component>): <summary>, for example fix(esp32): Fixed startup timeout issue
  • allowed types are: change,ci,docs,feat,fix,refactor,remove,revert,test
  • sufficiently descriptive message summary should be between 20 to 72 characters and start with upper case letter
  • avoid Jira references in commit messages (unavailable/irrelevant for our customers)

TIP: Install pre-commit hooks and run this check when committing (uses the Conventional Precommit Linter).

👋 Hello SuGlider, we appreciate your contribution to this project!


Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 36a7294

Copy link
Contributor

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32S30⚠️ +400.00⚠️ +0.01000.000.00
ESP32S20⚠️ +320.00⚠️ +0.01000.000.00
ESP32C30⚠️ +540.00⚠️ +0.02000.000.00
ESP32C60⚠️ +460.00⚠️ +0.02000.000.00
ESP32H20⚠️ +460.00⚠️ +0.02000.000.00
ESP320⚠️ +440.00⚠️ +0.02000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32S3ESP32S2ESP32C3ESP32C6ESP32H2ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
ESP32/examples/Serial/OnReceiveError_BREAK_Demo⚠️ +400⚠️ +320⚠️ +540⚠️ +460⚠️ +460⚠️ +440

Copy link
Contributor

Test Results

 56 files   56 suites   4m 9s ⏱️
 21 tests  21 ✅ 0 💤 0 ❌
134 runs  134 ✅ 0 💤 0 ❌

Results for commit 36a7294.

@me-no-dev me-no-dev added the Status: Pending Merge Pull Request is ready to be merged label Oct 25, 2024
@me-no-dev me-no-dev merged commit 74e4a74 into master Oct 25, 2024
55 checks passed
@me-no-dev me-no-dev deleted the uart_break_demo_improvement branch October 25, 2024 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Peripheral: UART Status: Pending Merge Pull Request is ready to be merged Type: Example Issue is related to specific example.
Projects
Development

Successfully merging this pull request may close these issues.

3 participants