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

Println off-by-one wrapping error #33

Open
tdicola opened this issue May 23, 2014 · 0 comments
Open

Println off-by-one wrapping error #33

tdicola opened this issue May 23, 2014 · 0 comments

Comments

@tdicola
Copy link
Contributor

tdicola commented May 23, 2014

Moving this bug adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library#16 from the PCD8544 library over to the GFX library since the GFX library handles the text rendering. The issue is that println for a string of text that is exactly the width of characters as the display will print two newlines, one for hitting the edge of the display and another because of the explicit newline in the function. This makes it difficult to display variable strings without carefully keeping track of the length of strings being printed.

I assume to resolve this we need to handle the case where the printed string is the same width as the display and suppress the end of display newline. I haven't looked into the GFX library yet to see if how Arduino's Print class is implemented might complicate catching this state. Opening this bug for now to come back to later though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant