From a62c91d938c75042a0ea35b9166e4cab9cf27eb1 Mon Sep 17 00:00:00 2001 From: Egor Date: Sun, 13 Oct 2024 21:30:03 -0700 Subject: [PATCH] WiFi load --- src/main.cpp | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 883889e..3815cfc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -49,11 +49,11 @@ // public and so will be exposed to the user. This allows direct manipulation of the // library internals. #define RADIOLIB_GODMODE (1) +#define RADIOLIB_CHECK_PARAMS (0) #include #include #include - #include #ifndef LILYGO @@ -612,6 +612,34 @@ void setup(void) } } + display.clear(); + + both.println("CLICK for WIFI settings."); + + for (int i = 0; i < 200; i++) + { + + both.print("."); + + button.update(); + delay(10); + if (button.pressedNow()) + { + both.println("-----------"); + both.println("Starting WIFI-SERVER..."); + tone(BUZZER_PIN, 205, 100); + delay(50); + tone(BUZZER_PIN, 205, 500); + tone(BUZZER_PIN, 205, 100); + delay(50); + + serverStart(); + break; + } + } + both.print("\n"); + + both.println("Init File System"); initLittleFS(); // writeFile(LittleFS, "/text.txt", "{WIFI:{name:\"sdfsdf\", Password:\"sdfsdf\"}"); @@ -636,9 +664,6 @@ void setup(void) smpls = readParameterFromParameterFile("samples"); Serial.println("SAMPLES: " + smpls); - both.println("Starting WIFI-SERVER"); - serverStart(); - CONF_SAMPLES = (smpls == "") ? samples : atoi(smpls.c_str()); samples = CONF_SAMPLES; CONF_FREQ_BEGIN = (fstart == "") ? FREQ_BEGIN : atoi(fstart.c_str());