My joystick does not have any mode switches, to compensate I want to be able to use the some of the extra buttons as switch modifiers to toggle between navigation, Air to Air, Air to Ground, communication and ground modes.
The problem I have encountered is that when a button has a function mapped to multiple modifiers it can be difficult to discern which function is going to fire because it takes two clicks to disable a modifier and there are no indicators showing which modifiers are enabled.
What I'd like to do is write some code that will only allow me to enable one modifier switch at a time. In short when a modifier switch button is pressed it will check the state of all of the modifier switches and set them to off. It will then enable just the modifier switch of the button that was just pressed.
It would look something like this for when Modefier3 is pressed:
if(Mdofier1State== true) then Modeifer1State ==False end
if(Mdofier2State== true) then Modeifer2State ==False end
if(Mdofier3State== false) then Modeifer3State ==True end
Is what I want to do possible and if so does anyone know the code for checking the state of a modifier switch and whether the switch state can be set through custom code? If so is there a better way to go about doing it?