Skip to content

Commit

Permalink
Use fill sprite as it can be faster
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremypoulter committed Oct 25, 2023
1 parent 4c29270 commit 13a90e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lcd_tft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ unsigned long LcdTask::loop(MicroTasks::WakeReason reason)

TFT_eSprite sprite(&_screen);
uint16_t *pixels = (uint16_t *)sprite.createSprite(BOOT_PROGRESS_WIDTH, BOOT_PROGRESS_HEIGHT);
sprite.fillScreen(TFT_OPENEVSE_BACK);
sprite.fillSprite(TFT_OPENEVSE_BACK);
sprite.fillRoundRect(0, 0, BOOT_PROGRESS_WIDTH, BOOT_PROGRESS_HEIGHT, 8, TFT_WHITE);
if(_boot_progress > 0) {
sprite.fillRoundRect(0, 0, _boot_progress, BOOT_PROGRESS_HEIGHT, 8, TFT_OPENEVSE_GREEN);
Expand Down Expand Up @@ -284,7 +284,7 @@ void LcdTask::render_text_box(const char *text, int16_t x, int16_t y, int16_t te
int16_t height = sprite.fontHeight();
uint16_t *pixels = (uint16_t *)sprite.createSprite(width, height);

sprite.fillScreen(back_colour);
sprite.fillSprite(back_colour);
sprite.drawString(text, text_x, height);

_screen.startWrite();
Expand Down

0 comments on commit 13a90e6

Please sign in to comment.