Pymavlink with Xbox/Ps5 controller

Hi @radman, welcome to the forum :slight_smile:

This is very difficult to answer meaningfully without any context about what you’re trying to achieve and the way(s) in which it is not working as you expected.

As some examples:

  • Is your joystick connecting to your computer?
  • Is your code able to receive inputs from the joystick?
  • Are there any error messages when you run your code, that you’d like help with resolving?
  • Is there something you expect your code to do that is not happening the way you would like?

As you’ve specified in your comment, ArduSub (for legacy reasons) expects the throttle value to be between 0 and 1000 - I’d recommend changing the -1000 in your scaling function to a 0, unless you’re running a custom vehicle firmware that processes negative throttle inputs here correctly.


By the way, I’ve edited your post to have the code in a code block, which formats it and makes it easier to read, or copy for testing. You can read more about that in the Formatting a Post/Comment section of the “How to Use the Forums” post :slight_smile:

1 Like