Merge pull request #721 from jg1uaa/master

This commit is contained in:
Jonathan Naylor 2021-10-30 17:27:36 +01:00 committed by GitHub
commit b1d5973bb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -121,10 +121,6 @@ bool CTFTSurenoo::open()
lcdReset();
clearScreen(BG_COLOUR);
setRotation(ROTATION_LANDSCAPE);
setBrightness(m_brightness);
setBackground(BG_COLOUR);
setIdle();
m_refreshTimer.start();
@ -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);