diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 2b028a842..71cdad008 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -156,7 +156,11 @@ static void drawSSLScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16 display->drawString(64 + x, y, "Creating SSL certificate"); display->setFont(FONT_SMALL); - display->drawString(64 + x, FONT_HEIGHT_SMALL + y + 2, "Please wait..."); + if ((millis() / 1000) % 2) { + display->drawString(64 + x, FONT_HEIGHT_SMALL + y + 2, "Please wait . . ."); + } else { + display->drawString(64 + x, FONT_HEIGHT_SMALL + y + 2, "Please wait . . "); + } } #ifdef HAS_EINK @@ -216,7 +220,11 @@ static void drawFrameFirmware(OLEDDisplay *display, OLEDDisplayUiState *state, i display->drawString(64 + x, y, "Updating"); display->setFont(FONT_SMALL); - display->drawString(64 + x, FONT_HEIGHT_SMALL + y + 2, "Please wait..."); + if ((millis() / 1000) % 2) { + display->drawString(64 + x, FONT_HEIGHT_SMALL + y + 2, "Please wait . . ."); + } else { + display->drawString(64 + x, FONT_HEIGHT_SMALL + y + 2, "Please wait . . "); + } // display->setFont(FONT_LARGE); // display->drawString(64 + x, 26 + y, btPIN); diff --git a/src/mesh/http/WebServer.cpp b/src/mesh/http/WebServer.cpp index f9e2e99dc..9d370846b 100644 --- a/src/mesh/http/WebServer.cpp +++ b/src/mesh/http/WebServer.cpp @@ -5,6 +5,7 @@ #include #include #include +#include "sleep.h" #include #include @@ -79,12 +80,14 @@ static void taskCreateCert(void *parameter) prefs.begin("MeshtasticHTTPS", false); // Delete the saved certs (used in debugging) - if (0) { + +#if 0 DEBUG_MSG("Deleting any saved SSL keys ...\n"); // prefs.clear(); prefs.remove("PK"); prefs.remove("cert"); - } +#endif + DEBUG_MSG("Checking if we have a previously saved SSL Certificate.\n"); @@ -103,16 +106,12 @@ static void taskCreateCert(void *parameter) cert = new SSLCert(certBuffer, certLen, pkBuffer, pkLen); DEBUG_MSG("Retrieved Private Key: %d Bytes\n", cert->getPKLength()); - // DEBUG_MSG("Retrieved Private Key: " + String(cert->getPKLength()) + " Bytes"); - // for (int i = 0; i < cert->getPKLength(); i++) - // Serial.print(cert->getPKData()[i], HEX); - // Serial.println(); - DEBUG_MSG("Retrieved Certificate: %d Bytes\n", cert->getCertLength()); - // for (int i = 0; i < cert->getCertLength(); i++) - // Serial.print(cert->getCertData()[i], HEX); - // Serial.println(); + } else { + + setCPUFast(true); + DEBUG_MSG("Creating the certificate. This may take a while. Please wait...\n"); yield(); cert = new SSLCert(); @@ -144,6 +143,9 @@ static void taskCreateCert(void *parameter) prefs.putBytes("PK", (uint8_t *)cert->getPKData(), cert->getPKLength()); prefs.putBytes("cert", (uint8_t *)cert->getCertData(), cert->getCertLength()); } + + setCPUFast(false); + } isCertReady = true;