How to control yaw with xbox controller's L1 and R1 button

Post here to get support
Post Reply
mcx
Beginner
Posts: 2
Joined: Tue Nov 24, 2020 7:21 am

How to control yaw with xbox controller's L1 and R1 button

Post by mcx »

Hi,
I'm trying to control the CF2.1 with Xbox One Game Controller. Everything works fine, but I found it's difficult to control thrust and yaw with the same joystick. So I want to control yaw with L1 and R1 button.I konw how to use commander.send_setpoint.But I want to know how the value be send from controller to client and CF2.1. Maybe I can change some python core of clients by pychram in win10.I just need CF2.1 rotate clockwise when I push R1 button and rotate counterclockwise when I push L1 button. What should I do?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: How to control yaw with xbox controller's L1 and R1 button

Post by arnaud »

This functionality is already implemented in the client but not exposed in the GUI. We call it "split axis" and it can be set in the JSON file of the input device mapping.

There is some doc about this functionality and the JSON file format in the repository doc: https://www.bitcraze.io/documentation/r ... figuration
mcx
Beginner
Posts: 2
Joined: Tue Nov 24, 2020 7:21 am

Re: How to control yaw with xbox controller's L1 and R1 button

Post by mcx »

OMG, that's amazing! I did it!
Thank you so much for the quick and helpful hint!
Post Reply