mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-02 18:59:56 +00:00
Fix Crash if no texts defined but plugin enabled
This commit is contained in:
parent
0e3ac246b5
commit
7282b562fa
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user