mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-23 08:45:48 +08:00
Add an error display.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user