Skip to content

Commit

Permalink
fixed issues found by the test-format CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
codingjourney committed Dec 21, 2024
1 parent 4aa51f3 commit 0f2d138
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/displayapp/screens/StopWatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,23 +180,18 @@ void StopWatch::RenderLaps() {
TimeSeparated laptime = ConvertTicksToTimeSegments(lap->timeSinceStart);
char buffer[19];
if (laptime.hours > 0) {
snprintf(buffer, sizeof(buffer), "\n#%-3d %3d:%02d:%02d.%02d",
snprintf(buffer,
sizeof(buffer),
"\n#%-3d %3d:%02d:%02d.%02d",
lap->number,
laptime.hours,
laptime.mins,
laptime.secs,
laptime.hundredths);
} else if (laptime.mins > 0) {
snprintf(buffer, sizeof(buffer), "\n#%-3d %2d:%02d.%02d",
lap->number,
laptime.mins,
laptime.secs,
laptime.hundredths);
snprintf(buffer, sizeof(buffer), "\n#%-3d %2d:%02d.%02d", lap->number, laptime.mins, laptime.secs, laptime.hundredths);
} else {
snprintf(buffer, sizeof(buffer), "\n#%-3d %2d.%02d",
lap->number,
laptime.secs,
laptime.hundredths);
snprintf(buffer, sizeof(buffer), "\n#%-3d %2d.%02d", lap->number, laptime.secs, laptime.hundredths);
}
lv_label_ins_text(lapText, LV_LABEL_POS_LAST, buffer);
}
Expand Down

0 comments on commit 0f2d138

Please sign in to comment.