Skip to content

Commit

Permalink
Guard against if no time poll messages are found in the log
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-bodenmann committed Mar 15, 2024
1 parent 26e11d6 commit 60b8881
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/scripts/adjust_alr_to_biocam_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ def analyse_time_differences(self):
timestamps_alr_ms.append(int(line.split(",")[5]))
timestamps_bc_1_ms.append(int(line.split(",")[7]))

if len(timestamps_bc_0_ms) == 0:
print("No time poll lines found in the serial log. Aborting.")
quit()

if timestamps_bc_0_ms != sorted(timestamps_bc_0_ms):
print(
"Timestamps are not sorted. Please indicate BioCam serial losg in "
Expand Down

0 comments on commit 60b8881

Please sign in to comment.