better w calc
This commit is contained in:
parent
125bfeea11
commit
8caa578608
1 changed files with 5 additions and 5 deletions
|
|
@ -501,11 +501,6 @@ class StitchingScanner:
|
||||||
no_movement_count = 0
|
no_movement_count = 0
|
||||||
max_no_movement = 50
|
max_no_movement = 50
|
||||||
stop_reason = 'stopped'
|
stop_reason = 'stopped'
|
||||||
if direction == ScanDirection.RIGHT:
|
|
||||||
self.state.current_x = 0
|
|
||||||
elif direction == ScanDirection.LEFT:
|
|
||||||
self.state.current_x = self.state.mosaic_width - w # At right edge
|
|
||||||
self.log(f"Current X offset ({self.state.current_x}px)")
|
|
||||||
|
|
||||||
while self.running and not self.paused:
|
while self.running and not self.paused:
|
||||||
if time.time() - start_time > self.config.max_scan_time:
|
if time.time() - start_time > self.config.max_scan_time:
|
||||||
|
|
@ -520,6 +515,11 @@ class StitchingScanner:
|
||||||
|
|
||||||
if abs(total_x) >= self.config.max_mosaic_width:
|
if abs(total_x) >= self.config.max_mosaic_width:
|
||||||
self.log(f"Max dimension reached ({self.config.max_mosaic_width}px)")
|
self.log(f"Max dimension reached ({self.config.max_mosaic_width}px)")
|
||||||
|
if direction == ScanDirection.RIGHT:
|
||||||
|
self.state.current_x = self.state.max_mosaic_width - w # At right edge
|
||||||
|
elif direction == ScanDirection.LEFT:
|
||||||
|
self.state.current_x = 0
|
||||||
|
self.log(f"Current X offset ({self.state.current_x}px)")
|
||||||
stop_reason = 'max_dim'
|
stop_reason = 'max_dim'
|
||||||
break
|
break
|
||||||
# Pulse motor
|
# Pulse motor
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue