diff --git a/src/stitching_scanner.py b/src/stitching_scanner.py index 1dda9c1..f72e2a8 100644 --- a/src/stitching_scanner.py +++ b/src/stitching_scanner.py @@ -162,6 +162,7 @@ class StitchingScanner: h_base, w_base = base.shape[:2] h_strip, w_strip = strip.shape[:2] + self.log(f"Base Width: {w_base}px") if h_strip != h_base: if append_right: @@ -507,14 +508,14 @@ class StitchingScanner: stop_reason = 'timeout' break - if current_dim() >= max_dim and direction == ScanDirection.RIGHT: + if current_dim() >= max_dim: self.log(f"Max dimension reached ({current_dim()}px)") stop_reason = 'max_dim' break - if current_dim() <= 0 and direction == ScanDirection.LEFT: - self.log(f"Max dimension reached ({current_dim()}px)") - stop_reason = 'min_dim' - break + # if current_dim() <= 0 and direction == ScanDirection.LEFT: + # self.log(f"Max dimension reached ({current_dim()}px)") + # stop_reason = 'min_dim' + # break if abs(total_x) >= self.config.max_mosaic_width: self.log(f"Max dimension reached ({self.config.max_mosaic_width}px)") @@ -523,8 +524,8 @@ class StitchingScanner: elif direction == ScanDirection.LEFT: self.state.current_x = 0 self.log(f"Current X offset ({self.state.current_x}px)") - # stop_reason = 'max_dim' - # break + stop_reason = 'max_dim' + break # Pulse motor self.motion.send_command(start_cmd) time.sleep(self.config.movement_interval)