added async stone detection thread

This commit is contained in:
2023-07-25 10:02:32 +02:00
parent e7932f5762
commit 3fa581a935

View File

@@ -50,10 +50,12 @@ class Litris(GameBase):
while True:
if self.stone_id_thread.get_pick_up_status() == False:
if (time() - last_letter_received) >= 5:
cv.waitKey(500)
self.dig_point(1500, 980, 100)
self.field.reset_field()
last_letter_received = time()
self.dig_point(1500, 980, 100)
if self.overlay.run_mode == 'stopped' or self.overlay.run_mode == 'paused':
return
continue
if self.overlay.run_mode == 'stopped' or self.overlay.run_mode == 'paused':
return
cv.waitKey(50)