diff options
Diffstat (limited to 'src/components/stopwatch')
| -rw-r--r-- | src/components/stopwatch/StopWatchController.cpp | 2 | ||||
| -rw-r--r-- | src/components/stopwatch/StopWatchController.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/components/stopwatch/StopWatchController.cpp b/src/components/stopwatch/StopWatchController.cpp index 64261055..4979ee68 100644 --- a/src/components/stopwatch/StopWatchController.cpp +++ b/src/components/stopwatch/StopWatchController.cpp @@ -33,9 +33,9 @@ void StopWatchController::Clear() { void StopWatchController::AddLapToHistory() { TickType_t lapEnd = GetElapsedTime(); + history--; history[0].timeSinceStart = lapEnd; history[0].number = ++maxLapNumber % lapNumberBoundary; - history--; } int StopWatchController::GetMaxLapNumber() { diff --git a/src/components/stopwatch/StopWatchController.h b/src/components/stopwatch/StopWatchController.h index 6aaec2b2..210cbeaa 100644 --- a/src/components/stopwatch/StopWatchController.h +++ b/src/components/stopwatch/StopWatchController.h @@ -56,7 +56,7 @@ namespace Pinetime { TickType_t timeElapsedPreviously; // Maximum number of stored laps - static constexpr int histSize = 2; + static constexpr int histSize = 4; // Value at which lap numbers wrap around to zero static constexpr int lapNumberBoundary = 1000; // Lap storage |
