limit on horizontal scanning
This commit is contained in:
parent
56f6138d09
commit
6c710ba182
1 changed files with 7 additions and 1 deletions
|
|
@ -449,6 +449,7 @@ class StitchingScanner:
|
|||
no_movement_count = 0
|
||||
max_no_movement = 50
|
||||
stop_reason = 'stopped'
|
||||
total_x = 0
|
||||
|
||||
while self.running and not self.paused:
|
||||
if time.time() - start_time > self.config.max_scan_time:
|
||||
|
|
@ -461,6 +462,10 @@ class StitchingScanner:
|
|||
stop_reason = 'max_dim'
|
||||
break
|
||||
|
||||
if abs(total_x) >= max_mosaic_width:
|
||||
self.log(f"Max dimension reached ({max_mosaic_width}px)")
|
||||
stop_reason = 'max_dim'
|
||||
break
|
||||
# Pulse motor
|
||||
self.motion.send_command(start_cmd)
|
||||
time.sleep(self.config.movement_interval)
|
||||
|
|
@ -473,6 +478,7 @@ class StitchingScanner:
|
|||
|
||||
self._displacement_since_append_x += dx
|
||||
self._displacement_since_append_y += dy
|
||||
total_x += dx
|
||||
|
||||
with self._state_lock:
|
||||
self.state.cumulative_x = self._displacement_since_append_x
|
||||
|
|
|
|||
Loading…
Reference in a new issue