Skip to content

Commit

Permalink
cleaning & uncommenting
Browse files Browse the repository at this point in the history
  • Loading branch information
d-tomasino committed Sep 21, 2023
1 parent 9da52b4 commit 0be07ae
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fastf1/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1905,8 +1905,7 @@ def _check_lap_accuracy(self):
& (not pd.isnull(lap['Time']))
& (not pd.isnull(lap['LapTime'])))

if pre_check_4:
pass
if pre_check_4: #needed condition for check_4
time_diff = np.sum((lap['Time'], -1 * prev_lap['Time'])).total_seconds()
lap_time = lap['LapTime'].total_seconds()
# If the difference between the two times is within a
Expand All @@ -1917,13 +1916,12 @@ def _check_lap_accuracy(self):
integrity_errors += 1
lap_integrity_flag = False
else:
pass
if not prev_lap_check:
check_4 = True #can't check if previous lap or its lap 'Time' is missing
else:
check_4 = False #data on current lap not available, means fail

result = check_1 and check_2 and check_3 #and check_4
result = check_1 and check_2 and check_3 and check_4
is_accurate.append(result)
prev_lap = lap

Expand Down

0 comments on commit 0be07ae

Please sign in to comment.