From f720a7fb3ce40880319ceba79eb00a9699dbc1ef Mon Sep 17 00:00:00 2001 From: codingjourney Date: Thu, 28 Nov 2024 05:19:34 +0100 Subject: upper bound for lap numbers --- src/components/stopwatch/StopWatchController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components/stopwatch/StopWatchController.cpp') diff --git a/src/components/stopwatch/StopWatchController.cpp b/src/components/stopwatch/StopWatchController.cpp index 7af80367..311bccc7 100644 --- a/src/components/stopwatch/StopWatchController.cpp +++ b/src/components/stopwatch/StopWatchController.cpp @@ -34,7 +34,7 @@ void StopWatchController::Clear() { void StopWatchController::AddLapToHistory() { TickType_t lapEnd = GetElapsedTime(); history[0].timeSinceStart = lapEnd; - history[0].number = ++maxLapNumber; + history[0].number = ++maxLapNumber % lapNumberBoundary; history--; } -- cgit v1.2.3-70-g09d2