Skip to content

Commit dbfaaf1

Browse files
fix time comparison b/w microseconds and seconds
1 parent d3b15ae commit dbfaaf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Telemetry-Main/LapCounter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void LapCounter::updateLapCounter(VehicleState state) {
7373
if (abs(data.lap_curr_x_f - data.lap_home_x_f) > X_TOLERANCE) return;
7474
if (abs(data.lap_curr_y_f - data.lap_home_y_f) > Y_TOLERANCE) return;
7575
if (abs(data.lap_curr_heading_f - data.lap_home_heading_f) > HEADING_TOLERANCE) return;
76-
if (timer.elapsed_time().count() < MIN_LAP_TIME) {
76+
if (std::chrono::duration<float>{timer.elapsed_time()}.count() < MIN_LAP_TIME) {
7777
timer.reset();
7878
timer.start();
7979

0 commit comments

Comments
 (0)