Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
rombie18 committed May 3, 2023
1 parent 05c3b99 commit f6a9d8a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Software/threads/customthreads.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def run(self):

logging.info("Initialising Controller...")

mngr = pyjoystick.ThreadEventManager(self.__controller_add, self.__controller_remove, self.__controller_process)
mngr = pyjoystick.ThreadEventManager(event_loop=run_event_loop, add_joystick=self.__controller_add, remove_joystick=self.__controller_remove, handle_key_event=self.__controller_process, alive=self.__controller_alive)
mngr.start()

self.init_event.set()
Expand Down Expand Up @@ -196,6 +196,9 @@ def __controller_process(self, key):
logging.debug("Controller event: " + str(key))
self.pipe.append(data)

def __controller_alive(self):
return self.stop_event.is_set()

class ImageProcessingThread(Thread):
def __init__(self, pipe, stop_event, init_event, pause_event):
super(ImageProcessingThread, self).__init__(name="ImageProcessingThread")
Expand Down

0 comments on commit f6a9d8a

Please sign in to comment.