forked from springbok/MLM2PRO-GSPro-Connector
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworker_gspro.py
More file actions
27 lines (21 loc) · 829 Bytes
/
Copy pathworker_gspro.py
File metadata and controls
27 lines (21 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import traceback
from PySide6.QtCore import Signal
from src.gspro_connect import GSProConnect
from src.worker_base import WorkerBase
class WorkerGspro(WorkerBase):
sent = Signal(object or None)
def __init__(self, gspro_connection: GSProConnect):
super().__init__()
self.gspro_connection = gspro_connection
def run(self, balldata=None):
if balldata is not None:
try:
self.started.emit()
self.gspro_connection.launch_ball(balldata)
except Exception as e:
traceback.print_exc()
self.error.emit((e, traceback.format_exc()))
else:
self.sent.emit(balldata) # Return the result of the processing
finally:
self.finished.emit() # Done