Skip to content

No way to clear logBuffer #396

@ropg

Description

@ropg

It just occurred to me that once printing has started, there is no way to print on lines higher than where the last print happened because there is no way for the user to clear logBuffer. Can't put that in clear() without restructuring as we use it internally before we print logBuffer. Also that would not show effect until the next print call, which kind of puts the user's head in a loop if she expects a Print-class device.

I propose a function cls(), which clears the display (immediately, so clear() and display()) as well as empties the logBuffer. Naturally this needs documentation and the difference between clear() and cls() would need to be explained. It'll always stay a bit confusing, but there's just too much code that uses clear() as is.

Didn't want to make this a PR just yet because maybe there's other/better ideas. If not I am happy to create the PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions