Add an error display.

This commit is contained in:
Jonathan Naylor
2016-03-21 22:47:58 +00:00
parent a3c25766c0
commit b19c46ff2c
11 changed files with 74 additions and 3 deletions

View File

@@ -67,10 +67,8 @@ bool CTFTSerial::open()
setBrightness(m_brightness);
// Set background white
setBackground(COLOUR_WHITE);
// Set foreground black
setForeground(COLOUR_BLACK);
setIdle();
@@ -92,6 +90,29 @@ void CTFTSerial::setIdle()
displayText("IDLE");
}
void CTFTSerial::setError(const char* text)
{
assert(text != NULL);
// Clear the screen
clearScreen();
setFontSize(FONT_MEDIUM);
// Draw MMDVM logo
displayBitmap(0U, 0U, "MMDVM_sm.bmp");
setForeground(COLOUR_RED);
gotoPosPixel(18U, 55U);
displayText(text);
gotoPosPixel(18U, 90U);
displayText("ERROR");
setForeground(COLOUR_BLACK);
}
void CTFTSerial::setLockout()
{
// Clear the screen