From 1a39e80562f2cda3785d30d1ebd0b21fc6be28be Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Tue, 21 Apr 2026 21:32:19 -0500 Subject: [PATCH] Introduce very simple boot status string --- src/gps/GPS.cpp | 1 + src/graphics/draw/UIRenderer.cpp | 3 +++ src/main.cpp | 1 + src/main.h | 2 ++ 4 files changed, 7 insertions(+) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index cf5511a33..274d497ba 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -505,6 +505,7 @@ bool GPS::setup() int msglen = 0; if (tx_gpio && gnssModel == GNSS_MODEL_UNKNOWN) { if (probeTries < GPS_PROBETRIES) { + bootString = "Probing GPS..."; gnssModel = probe(serialSpeeds[speedSelect]); if (gnssModel == GNSS_MODEL_UNKNOWN) { if (currentStep == 0 && ++speedSelect == array_count(serialSpeeds)) { diff --git a/src/graphics/draw/UIRenderer.cpp b/src/graphics/draw/UIRenderer.cpp index 4bf4df4bf..4076b5704 100644 --- a/src/graphics/draw/UIRenderer.cpp +++ b/src/graphics/draw/UIRenderer.cpp @@ -1149,6 +1149,9 @@ void UIRenderer::drawIconScreen(const char *upperMsg, OLEDDisplay *display, OLED const char *title = "meshtastic.org"; display->drawString(x + getStringCenteredX(title), y + SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM, title); display->setFont(FONT_SMALL); + if (bootString != nullptr) { + display->drawString(x + getStringCenteredX(bootString), y + SCREEN_HEIGHT - 2 * FONT_HEIGHT_MEDIUM, bootString); + } // Draw region in upper left if (upperMsg) display->drawString(x + 0, y + 0, upperMsg); diff --git a/src/main.cpp b/src/main.cpp index e517f94f0..4388a96a3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -83,6 +83,7 @@ NRF52Bluetooth *nrf52Bluetooth = nullptr; #include #endif +char *bootString = nullptr; // Pointer to a string that will be drawn on the boot screen, if set (used for GPS probing status) #ifdef ARCH_ESP32 #ifdef DEBUG_PARTITION_TABLE #include "esp_partition.h" diff --git a/src/main.h b/src/main.h index 56f048134..330d1f40f 100644 --- a/src/main.h +++ b/src/main.h @@ -101,3 +101,5 @@ void scannerToSensorsMap(const std::unique_ptr &i2cScanner, Scan // We default to 4MHz SPI, SPI mode 0 extern SPISettings spiSettings; + +extern char *bootString;