From 20e7f1d6a6a542031b3cb6694b193938e3ad76c6 Mon Sep 17 00:00:00 2001 From: Carsten Graf Date: Sat, 26 Jul 2025 02:57:38 +0200 Subject: [PATCH] Cleaning --- data/index.html | 32 ++++++++++++++++++-------------- platformio.ini | 25 +++++++++++++++++-------- src/wificlass.h | 9 ++++----- version.txt | 1 + 4 files changed, 40 insertions(+), 27 deletions(-) create mode 100644 version.txt diff --git a/data/index.html b/data/index.html index 18659f9..3032c51 100644 --- a/data/index.html +++ b/data/index.html @@ -57,14 +57,18 @@

🏊‍♀️ Bahn 1

00.00
-
Standby: Bitte beide 1x betätigen
+
+ Standby: Bitte beide 1x betätigen +

🏊‍♂️ Bahn 2

00.00
-
Standby: Bitte beide 1x betätigen
+
+ Standby: Bitte beide 1x betätigen +
@@ -332,41 +336,41 @@ } document.getElementById("time1").textContent = formatTime(display1); - + // Status fßr Bahn 1 const s1 = document.getElementById("status1"); const lane1Connected = areBothButtonsConnected(1); - + if (status1 === "ready" && !lane1Connected) { s1.className = "status standby"; - s1.textContent = "Standby: Bitte beide 1x betätigen"; + s1.textContent = "Standby: Bitte beide Buttons 1x betätigen"; } else { s1.className = `status ${status1}`; s1.textContent = status1 === "ready" ? "Bereit" : status1 === "running" - ? "Läuft..." - : "Beendet"; + ? "Läuft..." + : "Beendet"; } document.getElementById("time2").textContent = formatTime(display2); - + // Status fßr Bahn 2 const s2 = document.getElementById("status2"); const lane2Connected = areBothButtonsConnected(2); - + if (status2 === "ready" && !lane2Connected) { s2.className = "status standby"; - s2.textContent = "Standby: Bitte beide 1x betätigen"; + s2.textContent = "Standby: Bitte beide Buttons 1x betätigen"; } else { s2.className = `status ${status2}`; s2.textContent = status2 === "ready" ? "Bereit" : status2 === "running" - ? "Läuft..." - : "Beendet"; + ? "Läuft..." + : "Beendet"; } document.getElementById("best1").textContent = @@ -419,7 +423,7 @@ updateDisplay(); }) .catch((error) => - console.error("Fehler beim Laden der Daten:", error), + console.error("Fehler beim Laden der Daten:", error) ); } @@ -448,4 +452,4 @@ syncFromBackend(); - \ No newline at end of file + diff --git a/platformio.ini b/platformio.ini index 0fcb259..452204b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -31,11 +31,21 @@ lib_deps = mlesniew/PicoMQTT@^1.3.0 miguelbalboa/MFRC522@^1.4.12 adafruit/RTClib@^2.1.4 - ayushsharma82/ElegantOTA@^3.1.7 -[env:wemos_d1_mini32_OTA] -board = wemos_d1_mini32 + +[env:esp32thing_OTA] +board = esp32thing monitor_speed = 115200 +upload_protocol = espota +upload_port = 192.168.1.94 +build_flags = + -DBOARD_HAS_PSRAM + -mfix-esp32-psram-cache-issue + -DBATTERY_PIN=36 +board_upload.flash_size = 16MB +board_build.partitions = default_16MB.csv +targets = uploadfs +board_build.psram = disabled lib_deps = bblanchon/ArduinoJson@^7.4.1 esp32async/ESPAsyncWebServer@^3.7.7 @@ -43,9 +53,7 @@ lib_deps = mlesniew/PicoMQTT@^1.3.0 miguelbalboa/MFRC522@^1.4.12 adafruit/RTClib@^2.1.4 - ayushsharma82/ElegantOTA@^3.1.7 -upload_protocol = espota -upload_port = 192.168.1.94 + [env:esp32dev] board = esp32dev @@ -62,11 +70,12 @@ lib_deps = mlesniew/PicoMQTT@^1.3.0 miguelbalboa/MFRC522@^1.4.12 adafruit/RTClib@^2.1.4 - ayushsharma82/ElegantOTA@^3.1.7 + [env:esp32thing] board = esp32thing monitor_speed = 115200 +upload_port = COM12 build_flags = -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue @@ -82,4 +91,4 @@ lib_deps = mlesniew/PicoMQTT@^1.3.0 miguelbalboa/MFRC522@^1.4.12 adafruit/RTClib@^2.1.4 - ayushsharma82/ElegantOTA@^3.1.7 + diff --git a/src/wificlass.h b/src/wificlass.h index 2e23c6b..d7663c4 100644 --- a/src/wificlass.h +++ b/src/wificlass.h @@ -1,12 +1,10 @@ #pragma once #include #include // <-- mDNS hinzufßgen +#include #include #include #include -#include // OTA Updates - -#include #include "licenceing.h" #include "master.h" @@ -81,7 +79,7 @@ void setupWifi() { void setupOTA(AsyncWebServer *server) { // Initialize PrettyOTA - //ElegantOTA.begin(server); + // ElegantOTA.begin(server); OTAUpdates.Begin(server); @@ -91,11 +89,12 @@ void setupOTA(AsyncWebServer *server) { // Set firmware version to 1.0.0 OTAUpdates.SetAppVersion(firmwareversion); + OTAUpdates.UseDefaultCallbacks(true); + // Set current build time and date PRETTY_OTA_SET_CURRENT_BUILD_TIME_AND_DATE(); } - // Generiert eine eindeutige SSID auf Basis der MAC-Adresse. String getUniqueSSID() { uint8_t mac[6]; diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..7f20734 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +1.0.1 \ No newline at end of file