Skip to content

Conversation

caveman99
Copy link
Member

No description provided.

FREEWING-JP and others added 20 commits March 12, 2023 08:01
When logBuffer has logBufferMaxLines, the drawing needs to start shifted up by displayHeight % lineHeight so that the first line drops off a bit, and not the last. Now printing to display really just works.

(I moved the `length++` and removed the `else` because both sides of the condition started with it.)
* Added drawLogBuffer(0,0) and display() at end of write()

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

* The assumption that chars are at most twice as high as they're wide was too optimistic

* Remove the now unnecessary commands from DrawingDemo
There was no previous way for the user to empty the logBuffer, cls() fixes that. 
Also the documentation now explains the Print functionality and 
how it relates to the rest of the functions.
* logBuffer now stores max line length
* write() rewritten to discard all but \n past that length
* buffer cannot fill up prematurely
* write() partly rewritten for clarity, no more re-entry when full
Explain where we deviate from what user might expect.
* setLogBuffer needs to be re-called (and past buffer cleared) every time a `setFont` happens, as this changes the number of lines and chars. It now does not take arguments anymore and does things internally and is clearer about when it gives up.
* calculation of shiftUp for when on last line was wrong

* setLogBuffer() and drawLogBuffer()

old versions with arguments deprecated, new versions protected.

* Made no-op setLogBuffer return true to pass compiler error
@CLAassistant
Copy link

CLAassistant commented Mar 18, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 5 committers have signed the CLA.

❌ eitherway
❌ FREEWING-JP
❌ marcelstoer
❌ thijstriemstra
❌ ropg
You have signed the CLA already but the status is still pending? Let us recheck it.

@caveman99 caveman99 merged commit 1143247 into meshtastic:master Mar 18, 2024
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.

7 participants