This commit is contained in:
Carsten Graf
2025-07-26 02:57:38 +02:00
parent 0147ff2cd9
commit 20e7f1d6a6
4 changed files with 40 additions and 27 deletions

View File

@@ -57,14 +57,18 @@
<div id="name1" class="swimmer-name" style="display: none"></div>
<h2>🏊‍♀️ Bahn 1</h2>
<div id="time1" class="time-display">00.00</div>
<div id="status1" class="status standby">Standby: Bitte beide 1x betätigen</div>
<div id="status1" class="status standby">
Standby: Bitte beide 1x betätigen
</div>
</div>
<div class="lane">
<div id="name2" class="swimmer-name" style="display: none"></div>
<h2>🏊‍♂️ Bahn 2</h2>
<div id="time2" class="time-display">00.00</div>
<div id="status2" class="status standby">Standby: Bitte beide 1x betätigen</div>
<div id="status2" class="status standby">
Standby: Bitte beide 1x betätigen
</div>
</div>
</div>
@@ -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();
</script>
</body>
</html>
</html>

View File

@@ -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

View File

@@ -1,12 +1,10 @@
#pragma once
#include <Arduino.h>
#include <ESPmDNS.h> // <-- mDNS hinzufügen
#include <PrettyOTA.h>
#include <WiFi.h>
#include <esp_now.h>
#include <esp_wifi.h>
#include <ElegantOTA.h> // OTA Updates
#include <PrettyOTA.h>
#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];

1
version.txt Normal file
View File

@@ -0,0 +1 @@
1.0.1