fixed state lock
This commit is contained in:
parent
96422fe0d2
commit
2108ce78fc
1 changed files with 6 additions and 3 deletions
|
|
@ -639,6 +639,7 @@ class StitchingScanner:
|
|||
self._displacement_since_append_x += dx
|
||||
self._displacement_since_append_y += dy
|
||||
total_x += dx
|
||||
with self._state_lock:
|
||||
self.state.current_x += dx
|
||||
|
||||
with self._state_lock:
|
||||
|
|
@ -717,6 +718,7 @@ class StitchingScanner:
|
|||
|
||||
self._displacement_since_append_y += dy
|
||||
total_y += dy
|
||||
with self._state_lock:
|
||||
self.state.current_y += dy
|
||||
|
||||
with self._state_lock:
|
||||
|
|
@ -742,6 +744,7 @@ class StitchingScanner:
|
|||
# Done when we've moved enough
|
||||
if abs(total_y) >= target_displacement:
|
||||
self.log(f"Row transition complete: {abs(total_y):.1f}px")
|
||||
with self._state_lock:
|
||||
self.state.current_y = 0
|
||||
self.motion.send_command('s')
|
||||
time.sleep(self.config.settle_time)
|
||||
|
|
|
|||
Loading…
Reference in a new issue