Skip to content

setLogBuffer should clear logBufferFilled  #170

@sburlot

Description

@sburlot

Perhaps I dont really get it, but I want to display text on the screen, and clear it before each loop.

My loop looks like this:

	display.setLogBuffer(5, 30);
	display.clear();
	display.print("count = ");
	display.println(count);
	display.println("Hello");
	display.drawLogBuffer(0, 0);
	display.display();
	count = count+1;
	delay(1000);

Whatever I do, the display will scroll.

Modifying the file OLEDDisplay.cpp, in setLogBuffer

    this->logBufferSize     = size;   // Total number of characters the buffer can hold
    this->logBuffer         = (char *) malloc(size * sizeof(uint8_t));
    this->logBufferFilled   = 0; // <-- Add this line

And now it does what I need it to.
Did I miss something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions