Skip to content

Commit

Permalink
Merge pull request #721 from jg1uaa/master
Browse files Browse the repository at this point in the history
  • Loading branch information
g4klx authored Oct 30, 2021
2 parents 204b414 + 483a886 commit b1d5973
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions TFTSurenoo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ bool CTFTSurenoo::open()

lcdReset();
clearScreen(BG_COLOUR);

setRotation(ROTATION_LANDSCAPE);
setBrightness(m_brightness);
setBackground(BG_COLOUR);
setIdle();

m_refreshTimer.start();
Expand Down Expand Up @@ -456,6 +452,13 @@ void CTFTSurenoo::refreshDisplay(void)
::snprintf(m_temp, sizeof(m_temp), STR_CRLF);
m_serial->write((unsigned char*)m_temp, (unsigned int)::strlen(m_temp));

// config display
setRotation(ROTATION_LANDSCAPE);
setBrightness(m_brightness);
setBackground(BG_COLOUR);
m_serial->write((unsigned char*)m_temp, (unsigned int)::strlen(m_temp));
CThread::sleep(5);

// clear display
::snprintf(m_temp, sizeof(m_temp), "BOXF(%d,%d,%d,%d,%d);",
0, 0, X_WIDTH - 1, Y_WIDTH - 1, BG_COLOUR);
Expand Down

0 comments on commit b1d5973

Please sign in to comment.