From aea82d1e1f646d63e5418323c1bcbdeff0761283 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Thu, 18 Aug 2022 16:11:33 -0500 Subject: [PATCH] Display device name in boot screen --- src/graphics/Screen.cpp | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 40b8fe5ed..85439644a 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -228,26 +228,17 @@ static void drawSSLScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16 // Used when booting without a region set static void drawWelcomeScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) { - + display->setFont(FONT_SMALL); + display->setTextAlignment(TEXT_ALIGN_CENTER); + display->drawString(64 + x, y, "//\\ E S H T /\\ S T / C"); + display->drawString(64 + x, y + FONT_HEIGHT_SMALL, getDeviceName()); + display->setTextAlignment(TEXT_ALIGN_LEFT); + if ((millis() / 10000) % 2) { - display->setFont(FONT_SMALL); - - display->setTextAlignment(TEXT_ALIGN_CENTER); - display->drawString(64 + x, y, "//\\ E S H T /\\ S T / C"); - - display->setTextAlignment(TEXT_ALIGN_LEFT); - display->drawString(x, y + FONT_HEIGHT_SMALL * 2 - 3, "Set the region using the"); display->drawString(x, y + FONT_HEIGHT_SMALL * 3 - 3, "Meshtastic Android, iOS,"); display->drawString(x, y + FONT_HEIGHT_SMALL * 4 - 3, "Flasher or CLI client."); } else { - display->setFont(FONT_SMALL); - - display->setTextAlignment(TEXT_ALIGN_CENTER); - display->drawString(64 + x, y, "//\\ E S H T /\\ S T / C"); - - display->setTextAlignment(TEXT_ALIGN_LEFT); - display->drawString(x, y + FONT_HEIGHT_SMALL * 2 - 3, "Visit meshtastic.org"); display->drawString(x, y + FONT_HEIGHT_SMALL * 3 - 3, "for more information."); display->drawString(x, y + FONT_HEIGHT_SMALL * 4 - 3, "");