Added minTime
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user