From 00a4b38a832fa15b4934e37f933b4abfe08fa53f Mon Sep 17 00:00:00 2001 From: Richard Bowman Date: Wed, 10 Jan 2024 21:07:25 +0000 Subject: [PATCH] Prevent scans from filling the SD card --- src/openflexure_microscope_server/things/smart_scan.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openflexure_microscope_server/things/smart_scan.py b/src/openflexure_microscope_server/things/smart_scan.py index bdfde4c7..519daefb 100644 --- a/src/openflexure_microscope_server/things/smart_scan.py +++ b/src/openflexure_microscope_server/things/smart_scan.py @@ -428,6 +428,7 @@ class SmartScanThing(Thing): recentre.looping_autofocus() # move to each x-y position. in z, move to the height of the closest x-y position that successfully focused while len(path) > 0: + ensure_free_disk_space(scan_path) loc = [path[0][0], path[0][1], stage.position["z"]]