Migrate Stream search internals from char to uint8_t#274
Open
asumo-1xts wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(I'm still new to contributing to OSS, so please let me know if there's anything I need to correct!)
Overview
This PR is regarding issue #119.
In the current code,
Stream::find()cannot find values above 0x7f because it treats the target string aschar.This PR fixes the issue by changing the target string type from
chartouint8_t.Verification on an actual device
I confirmed with an Arduino UNO R3 clone that the sketch below does not blink the built-in LED with the current code, but it does blink with the fixed code.
Note
It performs serial communication from its own TX to its own RX.
Please make sure to connect the TX and RX pins after uploading the sketch.
Note
To build the sketch correctly, you may need to rewrite the header-include in
Stream.cpp:Common.h->Arduino.h