Skip to content

Commit

Permalink
perform calibration in another thread
Browse files Browse the repository at this point in the history
Signed-off-by: Kenji Brameld <kenjibrameld@gmail.com>
  • Loading branch information
ijnek authored and JWhitleyWork committed Dec 4, 2022
1 parent daa1b43 commit 090ca8d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ def on_mouse(self, event, x, y, flags, param):
if self.c.goodenough:
if 180 <= y < 280:
print("**** Calibrating ****")
self.c.do_calibration()
# Perform calibration in another thread to prevent UI blocking
threading.Thread(target=self.c.do_calibration, name="Calibration").start()
self.buttons(self._last_display)
self.queue_display.put(self._last_display)
if self.c.calibrated:
Expand Down

0 comments on commit 090ca8d

Please sign in to comment.