Пример #1
0
def main():

    # global exit_flag

    js_lock = threading.Lock()
    arm_lock = threading.Lock()

    js = Joystick(1, "Thread - Joystick", js_lock)
    arm = None

    screen = Screen()

    hotas = HOTAS_Arm(1, "Thread - HOTAS", js, arm, js_lock, arm_lock, screen)

    js.start()
    hotas.start()
    screen.start()

    screen.join()
    js.stop()
    print("Joystick asked to stop...")
    hotas.stop()
    print("Program asked to stop...")

    hotas.join()
    print("Main Ended")
    print("Please press a key on the joystick to end the program...")
    js.join()
    print("Program ended...")