AlexTheM8 / AiAi-AI

3 stars 0 forks source link

Controller config functions #18

Closed AlexTheM8 closed 2 years ago

AlexTheM8 commented 2 years ago

To facilitate an easier setup for the controller, dummy controller config functions should be made. The load_state() function already handles this, but the joystick config requires a "reset" to execute properly. See the below code example for setting UP:

controller = Controller()
sleep(0.1)
while True:
    controller.do_movement(0, 1)
    sleep(0.1)
    controller.do_movement(0, 0)
    sleep(0.1)