Skip to content

Print pipe #7

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

Merged
merged 3 commits into from
Aug 25, 2018
Merged

Print pipe #7

merged 3 commits into from
Aug 25, 2018

Conversation

fourstix
Copy link
Contributor

Add function to print the settings command character pipe, by doubling the command character

Fixed a bug (Fence Post error) in the Display Customer character command that allowed the user to request a ninth character when only 8 are allowed.  The upper limit in the if statement was off by one.  The allowable range should be 35 to 42, inclusive, not 35 to 43.
Fixed a fence post error in the Display Custom Character function
This allows the user to print a pipe control character to the display by escaping the control character as a double pipe
@fourstix
Copy link
Contributor Author

Sorry for the terse commit in the pull request. This code adds logic to print a Pipe "|" character to the display. The pipe character is used as the settings command and is currently eaten by the display. Worse if the next character happens to collide with a command, that character will invoke a display setting rather than printing as a pipe. With this change the user can escape the pipe character with two command settings characters, ie "||". For example, "||-2|| = 2" would display on the serLCD as "|-2| = 2".
Closes #8

@fourstix
Copy link
Contributor Author

I think I did the pull request wrong to this repository. I have merged the commit to the master in my fork, and will create the pull request again from master to master. I think that's the way it should be.

@fourstix fourstix closed this Aug 24, 2018
@fourstix
Copy link
Contributor Author

Nevermind. I think I did it right.

@fourstix fourstix reopened this Aug 24, 2018
@nseidle
Copy link
Member

nseidle commented Aug 25, 2018

Hi @fourstix - this is awesome. Thanks for contributing!

Issues are good, PRs are GOLD. But I couldn't respond because I've been exploring the caves of your xkcd link for the past three days.

This PR looks good. It looks like a dupe of PR #6. I'll close 6, and the original issue, then merge this one.

Thank you again for your help!

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