Merge pull request #1343 from meshtastic/patch-1

Fix Crash if no texts defined but plugin enabled
pull/1344/head
Thomas Göttgens 2022-03-31 15:10:33 +02:00 zatwierdzone przez GitHub
commit 2627db66ff
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -307,6 +307,12 @@ void CannedMessageModule::drawFrame(
display->setFont(FONT_MEDIUM); display->setFont(FONT_MEDIUM);
display->drawString(display->getWidth()/2 + x, 0 + y + 12, "Sending..."); display->drawString(display->getWidth()/2 + x, 0 + y + 12, "Sending...");
} }
else if (cannedMessageModule->runState == CANNED_MESSAGE_RUN_STATE_DISABLED)
{
display->setTextAlignment(TEXT_ALIGN_LEFT);
display->setFont(FONT_SMALL);
display->drawString(10 + x, 0 + y + 16, "Canned Message\nModule disabled.");
}
else else
{ {
display->setTextAlignment(TEXT_ALIGN_LEFT); display->setTextAlignment(TEXT_ALIGN_LEFT);