Skip to content

buffered output fails to be rendered #2

@antevens

Description

@antevens

Subject of the issue

Using buffered output for text fails to render to screen

Your workbench

Arduino 33 BLE Sense
On a breadboard, powered from USB
SPI interface at 10Mhz

Steps to reproduce

#include "HyperDisplay_UG2856KLBAG01.h"

uint8_t windowMemZero[10*128/8]; // not sure if this is the right way to reserve monochrome pixel memory

//////////////////////////////
// Pinout and Hardware //
//////////////////////////////
#define SERIAL_PORT Serial
#define SPI_PORT SPI
#define CS_PIN 9
#define DC_PIN 10
// END USER SETUP

// Set colors for the TOLED display
uint8_t color = 0x01;
uint8_t noColor = 0x00;

// Set up Transparent Organic LED Display and SPI communications
UG2856KLBAG01_SPI TOLED;

// Create Windows
wind_info_t windowZero, windowOne, windowTwo; // Create some window objects

void setup() {
// Start serial communications
Serial.begin(9600);

// Start TOLED/SPI communications
SPI_PORT.begin();
TOLED.begin(CS_PIN, DC_PIN, SPI_PORT);

TOLED.setWindowDefaults(&windowZero);
TOLED.setWindowDefaults(&windowOne);
TOLED.setWindowDefaults(&windowTwo);

TOLED.setWindowColorSequence(&windowZero, (color_t)&color);
TOLED.setWindowColorSequence(&windowOne, (color_t)&color);
TOLED.setWindowColorSequence(&windowTwo, (color_t)&color);

TOLED.setWindowMemory(&windowZero, (color_t)windowMemZero, 10*128);

windowZero.xMin = 0;
windowZero.yMin = 0;
windowZero.xMax = 127;
windowZero.yMax = 9;

windowOne.xMin = 0;
windowOne.yMin = 10;
windowOne.xMax = 127;
windowOne.yMax = 19;

windowTwo.xMin = 0;
windowTwo.yMin = 20;
windowTwo.xMax = 127;
windowTwo.yMax = 29;

TOLED.pCurrentWindow = &windowZero;
TOLED.buffer();
TOLED.println("buffered fails");
TOLED.resetTextCursor();
TOLED.show(&windowZero);

TOLED.pCurrentWindow = &windowOne;
TOLED.println("two direct");
TOLED.resetTextCursor();

TOLED.pCurrentWindow = &windowTwo;
TOLED.println("three will be cleared");
TOLED.resetTextCursor();

delay(3000);
TOLED.windowClear();

Serial.println(F("Transparent Graphical OLED"));
}

void loop() {
Serial.println(F("looping"));
delay(1000);
TOLED.show();
TOLED.show(&windowZero);
TOLED.pCurrentWindow = &windowZero;
TOLED.direct();
TOLED.println("direct works");
TOLED.resetTextCursor();
TOLED.buffer();
TOLED.println("buffered fails"); // but the cursor is still moved ...
TOLED.resetTextCursor();
TOLED.show();
delay(1000);
}

Expected behaviour

Buffered text should be rendered to screen alternating with direct text

Actual behaviour

Buffered text is never shown

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