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

Provide consistent serial console interface for samples #2739

Merged
merged 6 commits into from
Mar 22, 2024

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Mar 21, 2024

This PR provides a consistent mechanism for a basic serial console interface using the LineBuffer class.

Refactor LineBuffer

Implement LineBufferBase so we take non-trivial methods out of header.

Add bool, String operators, printTo method&

Simplify usage

Add process, processKey methods and update samples

Use LineBuffer for LiveDebug, Basic_Ota and Basic_FlashIP samples.
These new methods are used to simplify application code.

Note that the CommandProcessing::Handler class hasn't been updated here,
mainly because it requires customisation of EOL handling (setCommandEOL, getCommandEOL).
Presumably this is because of the variation in EOL sequences (CR, LF, CRLF or LFCR combinations).
The LineBuffer processKey method doesn't care, it handles all of these.

@slaff slaff added this to the 5.2.0 milestone Mar 21, 2024
@slaff
Copy link
Contributor

slaff commented Mar 21, 2024

@mikee47 can you rebase?

@mikee47 mikee47 force-pushed the feature/linebuffers branch from 39b0e7d to f40bf5f Compare March 21, 2024 16:04
@slaff slaff merged commit fdbc1f0 into SmingHub:develop Mar 22, 2024
45 of 46 checks passed
@mikee47 mikee47 deleted the feature/linebuffers branch March 25, 2024 19:43
@slaff slaff mentioned this pull request May 8, 2024
5 tasks
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