Home        Store        Docs        Blog

ArduSub joystick button code to ArduCopter



I’m trying to port your joystick button code over to my ArduCopter build. Is it possible, and can anyone point me in the right direction?


(Jacob) #2

This won’t be easy; a lot of the copter ‘vehicle code’ logic is based on the concept of rc transmitter switches. The latching operation of these switches is fundamentally different than the toggle behavior of joystick buttons, and therein lies the difficulty.

Because this concept is spread throughout the vehicle code, you will need to study the much of the vehicle code rather than just one file. This is my recommendation for a place to start, study the entire vehicle code in the ArduCopter directory to understand what all will need to be changed to accomplish this.


Thanks for your quick reply @jwalser

Ok, I under stand the problems, I will study the code more in detail.

I only want to use buttons to arm / disarm and change flight modes, will toggle buttons be hard to implement for this purpose aswell?