diff --git a/src/gps/GPS.h b/src/gps/GPS.h index 8d63ce82f..337d855b8 100644 --- a/src/gps/GPS.h +++ b/src/gps/GPS.h @@ -128,6 +128,8 @@ class GPS : private concurrency::OSThread // Let the GPS hardware save power between updates void down(); + bool initFinished() const { return GPSInitFinished; }; + private: GPS() : concurrency::OSThread("GPS") {} diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index f315011d8..2d6f44eba 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -889,7 +889,7 @@ int32_t Screen::runOnce() // Show boot screen for first logo_timeout seconds, then switch to normal operation. // serialSinceMsec adjusts for additional serial wait time during nRF52 bootup static bool showingBootScreen = true; - if (showingBootScreen && (millis() > (logo_timeout + serialSinceMsec))) { + if (showingBootScreen && (!gps || gps->initFinished()) && (millis() > (logo_timeout + serialSinceMsec))) { LOG_INFO("Done with boot screen"); stopBootScreen(); showingBootScreen = false; diff --git a/src/graphics/draw/UIRenderer.cpp b/src/graphics/draw/UIRenderer.cpp index 4076b5704..a20d3399f 100644 --- a/src/graphics/draw/UIRenderer.cpp +++ b/src/graphics/draw/UIRenderer.cpp @@ -1150,7 +1150,22 @@ void UIRenderer::drawIconScreen(const char *upperMsg, OLEDDisplay *display, OLED 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); + static uint8_t bootStringStep = 0; + char stringCharacter = '.'; + uint32_t stringWidth = getStringCenteredX(bootString); + if (bootStringStep == 0) { + stringCharacter = '.'; + bootStringStep++; + } else if (bootStringStep == 1) { + stringCharacter = 'o'; + bootStringStep++; + } else if (bootStringStep == 2) { + stringCharacter = 'O'; + bootStringStep = 0; + } + char tmpBootString[40]; + snprintf(tmpBootString, sizeof(tmpBootString), "%s %c", bootString, stringCharacter); + display->drawString(x + stringWidth, y + SCREEN_HEIGHT - 2 * FONT_HEIGHT_MEDIUM, tmpBootString); } // Draw region in upper left if (upperMsg) diff --git a/src/main.cpp b/src/main.cpp index 4388a96a3..1d4ff813a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -83,7 +83,8 @@ 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) +const 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 330d1f40f..9b1ac92a9 100644 --- a/src/main.h +++ b/src/main.h @@ -102,4 +102,4 @@ void scannerToSensorsMap(const std::unique_ptr &i2cScanner, Scan // We default to 4MHz SPI, SPI mode 0 extern SPISettings spiSettings; -extern char *bootString; +extern const char *bootString;