Added minTime

This commit is contained in:
Carsten Graf
2025-10-13 19:17:35 +02:00
parent 5ca67d8804
commit 2a832257ba
9 changed files with 115 additions and 48 deletions

View File

@@ -526,6 +526,15 @@ void sendTimeToOnlineAPI(int lane, String uid, float timeInSeconds) {
// Funktionen für lokales Leaderboard
void addLocalTime(String uid, String name, unsigned long timeMs) {
// Prüfe minimale Zeit für Leaderboard-Eintrag
if (timeMs < minTimeForLeaderboard) {
Serial.printf(
"Zeit zu kurz für Leaderboard: %s (%s) - %.2fs (Minimum: %.2fs)\n",
name.c_str(), uid.c_str(), timeMs / 1000.0,
minTimeForLeaderboard / 1000.0);
return; // Zeit wird nicht ins Leaderboard eingetragen
}
LocalTime newTime;
newTime.uid = uid;
newTime.name = name;