(self, gui=None, ups=60)
Setup the tracking thread.

        Parameters:
            gui (QObject): The main GUI.
            ups (int): The number of updates per second.
Setup the tracking thread.
Setup the tracking thread .
def __init__(self, gui=None, ups=60):
        """Setup the tracking thread.

        Parameters:
            gui (QObject): The main GUI.
            ups (int): The number of updates per second.
        """
        self.gui = gui
        self.ups = ups
        self.start()

        self.double_click_ticks = int(round(self.ups * DOUBLE_CLICK_INTERVAL))

        # Map commands to functions
        self.mapping_important = {
            GUICommand.Stop: self.stop,
            GUICommand.Pause: partial(self.pause, True),
            GUICommand.Unpause: partial(self.pause, False),
            GUICommand.TogglePause: self.pause,
        }
        self.mapping_pausable = {
            GUICommand.RaiseException: lambda: 1/0,
        }

        # Warning message
        if XInput is None:
            print('Unable to load XInput library')

        # Start background process
        self.process_sender = Queue()
        self.process_receiver = Queue()
        self.process = process.start(self.process_sender, self.process_receiver)
def __init__ ( self , gui = None , ups = 60 ) : self . gui = gui self . ups = ups self . start ( ) self . double_click_ticks = int ( round ( self . ups * DOUBLE_CLICK_INTERVAL ) ) # Map commands to functions self . mapping_important = { GUICommand . Stop : self . stop , GUICommand . Pause : partial ( self . pause , True ) , GUICommand . Unpause : partial ( self . pause , False ) , GUICommand . TogglePause : self . pause , } self . mapping_pausable = { GUICommand . RaiseException : lambda : 1 / 0 , } # Warning message if XInput is None : print ( 'Unable to load XInput library' ) # Start background process self . process_sender = Queue ( ) self . process_receiver = Queue ( ) self . process = process . start ( self . process_sender , self . process_receiver )