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

Added drawLogBuffer(0,0) and display() at end of write() #389

Merged
merged 3 commits into from
Mar 10, 2024

Conversation

ropg
Copy link
Contributor

@ropg ropg commented Feb 23, 2024

Now print, println and printf "just work" because they execute drawLogBuffer(0,0) and display() when done.

New protected boolean inhibitDrawLogBuffer makes sure display is not refreshed every character when a string of characters is written at once. I think this is the implementation of what was Helmut's TODO item at the beginning of the file, which read: "Finish _putc with drawLogBuffer when running display". Note that I moved the creation of the logbuffer from _putc() to write(), because we also want it it to "just work" on Arduino.

Now print, println and printf "just work", while display not refreshed every character when a string of characters is written, only at the end.
@marcelstoer
Copy link
Member

Thanks. Can you please clean-up the white-space/formatting changes in write(). The diff is too large because of that.

I think this is the implementation of what was Helmut's TODO item at the beginning of the file

@helmut64 I think that refers to you 😄

@ropg
Copy link
Contributor Author

ropg commented Feb 23, 2024

I needed to change the indent on the whole block because there was a if (this->logBufferSize > 0) { wrapping most of write() that is not necessary anymore if we make sure there's always a logBuffer. Not sure how to not make a large commit when removing a wrapping condition like that.

@marcelstoer
Copy link
Member

Oh, right...Once I looked at it outside the diff viewer I realized it's actually correct. Got confused by the diff. Sorry about that.

@marcelstoer marcelstoer merged commit 1da41d9 into ThingPulse:master Mar 10, 2024
6 checks passed
@ropg ropg deleted the fix_print branch March 11, 2024 18:33
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