CurryKitten / CurryKitten-Sim

FPV quad simulator
70 stars 7 forks source link

Add the ability to perform certain keyboard actions via switches on a radio #23

Closed CurryKitten closed 4 years ago

CurryKitten commented 4 years ago

Several people made the comment after the 0.4a release about being able to map a command (especially the reset (R Key)) onto a switch on their radio.

This is certainly possible, as switches map to axis correctly under Rewired - although it potentially means restructuring the way we do remapping (yay!)

Would be useful though, so I'll aim to add this in as a feature - although I'm intending to add a "flip" control where the user is able to press a key to flip their quad back over if they crash upside down instead of having to reset to the start position

sasplayers commented 4 years ago

flip works well, but as you have to still use the keyboard it becomes tiresome if your a learner like me to fly a drone.

CurryKitten commented 4 years ago

The intention would be to include reset, flip and perhaps some other stuff as an option to map onto a radio/controller

CurryKitten commented 4 years ago

I've done what I'm going to call a "first pass" on this by adding in the Flip and Reset options on switches. I've limited this to the use of switches right now (that effectively work as axis) as a lot of those USB dongle type adapters were registering "ghost" button presses.

I've changed the remap feature to prompt for a switch movement for Flip and Reset, and this then shows up on the debug page. You can, of course, no put any input in and nothing will get assigned.

Screenshot 2020-04-20 at 23 48 56

You can still use keys instead/as well whether you have any switches assigned or not. I might consider this to be slightly experimental as I'm not sure how well all radios will support this, and I may come back in the future and change the way we assign things.