Skip to content

Commit

Permalink
Fix formatting issue on the lap counter in Stopwatch (display lap cou…
Browse files Browse the repository at this point in the history
…nter on 2 characters).
  • Loading branch information
JF002 committed Apr 20, 2021
1 parent 410cc82 commit fefb429
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/displayapp/screens/StopWatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ bool StopWatch::Refresh() {

if (lapPressed == true) {
if (lapBuffer[1]) {
lv_label_set_text_fmt(lapOneText, "#%d %2d:%02d.%02d", (lapNr - 1), lapBuffer[1]->mins, lapBuffer[1]->secs, lapBuffer[1]->hundredths);
lv_label_set_text_fmt(lapOneText, "#%2d %2d:%02d.%02d", (lapNr - 1), lapBuffer[1]->mins, lapBuffer[1]->secs, lapBuffer[1]->hundredths);
}
if (lapBuffer[0]) {
lv_label_set_text_fmt(lapTwoText, "#%d %2d:%02d.%02d", lapNr, lapBuffer[0]->mins, lapBuffer[0]->secs, lapBuffer[0]->hundredths);
lv_label_set_text_fmt(lapTwoText, "#%2d %2d:%02d.%02d", lapNr, lapBuffer[0]->mins, lapBuffer[0]->secs, lapBuffer[0]->hundredths);
}
// Reset the bool to avoid setting the text in each cycle until there is a change
lapPressed = false;
Expand Down

0 comments on commit fefb429

Please sign in to comment.