Skip to content

Commit

Permalink
more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
tballmsft committed Feb 2, 2024
1 parent c0bb08f commit 0bd4f49
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions libs/st7735/screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ class WDisplay {
}

if (lcd) {
DMESG("LCD");
auto bl = LOOKUP_PIN(DISPLAY_BL);
if (bl) {
bl->setDigitalValue(1);
Expand Down Expand Up @@ -231,9 +232,10 @@ class WDisplay {
smart->setAddrWindow(offX, offY, width, displayHeight);
}
void waitForSendDone() {
if (lcd)
if (lcd) {
DMESG("lcd: wait");
lcd->waitForSendDone();
else
} else
smart->waitForSendDone();
}
int sendIndexedImage(const uint8_t *src, unsigned width, unsigned height, uint32_t *palette) {
Expand Down Expand Up @@ -353,7 +355,7 @@ void updateScreen(SImage_ img) {
img->height() * mult != display->displayHeight)
target_panic(131); // PANIC_SCREEN_ERROR

// DMESG("wait for done");
DMESG("wait for done");
display->waitForSendDone();

auto palette = display->currPalette;
Expand All @@ -368,7 +370,7 @@ void updateScreen(SImage_ img) {

memcpy(display->screenBuf, img->pix(), img->pixLength());

// DMESG("send");
DMESG("send");
display->sendIndexedImage(display->screenBuf, img->width(), img->height(), palette);
}

Expand Down

0 comments on commit 0bd4f49

Please sign in to comment.