Skip to content

Commit

Permalink
Reset resume flag after capture execution to ensure correct behavior …
Browse files Browse the repository at this point in the history
…in subsequent runs
  • Loading branch information
dvida committed Dec 26, 2024
1 parent dd0c63b commit 6ce4833
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions RMS/StartCapture.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,6 @@ def runCapture(config, duration=None, video_file=None, nodetect=False, detect_en
else:
log.info("Previous capture directory found: {:s}".format(night_data_dir))

# Resume run is finished now, reset resume flag
cml_args.resume = False


# Make a name for the capture data directory
if night_data_dir_name is None:
Expand Down Expand Up @@ -983,6 +980,7 @@ def processIncompleteCaptures(config, upload_manager):
# Run the capture for the given number of hours
runCapture(config, duration=duration, nodetect=cml_args.nodetect, upload_manager=upload_manager, \
detect_end=cml_args.detectend, resume_capture=cml_args.resume)
cml_args.resume = False

if upload_manager is not None:
# Stop the upload manager
Expand All @@ -1008,6 +1006,7 @@ def processIncompleteCaptures(config, upload_manager):
# Capture the video frames from the video file
runCapture(config, duration=None, video_file=video_file, nodetect=cml_args.nodetect,
resume_capture=cml_args.resume)
cml_args.resume = False

sys.exit()

Expand Down Expand Up @@ -1332,6 +1331,7 @@ def processIncompleteCaptures(config, upload_manager):
night_archive_dir = runCapture(config, duration=duration, nodetect=cml_args.nodetect, \
upload_manager=upload_manager, eventmonitor=eventmonitor, detect_end=(cml_args.detectend or config.postprocess_at_end), \
resume_capture=cml_args.resume, daytime_mode=daytime_mode)
cml_args.resume = False

# Indicate that the capture was done once
ran_once = True
Expand Down

0 comments on commit 6ce4833

Please sign in to comment.