Momentary buttons powered by real buttons
-
I try to address for example the Annunciator Test Button and the Surface Deice Switch with switches in my home cockpit (via Button Box Interface and Axis and Ohs). This switches are momentary. Is there a way to address the momentary buttons/switches via code that they remain activated as long as I press the real switch? I searched a lot inside the animation and other codes of the Baron but I couldn't get it to work.
-
If I'm understanding your question correctly, and you are using "L:var_AnnunciatorTestButton", for example, which returns immediately, try using "L:var_AnnunciatorTestButton_IsDown". That should work for most momentary L:Var switches/buttons in my aircraft.
-
Yes it works, thank you, I don´t see that this var is also writeable. For the deice switch I think there is no var with "IsDown", but I found a working solution like this to sync the behaviour with my switch as long as it is held for AUTO for example:
0 (>L:var_surfaceDeiceSwitch, bool)
15 (>L:var_surfaceDeiceTimer, Number)
1 - (>L:var_surfaceDeiceSwitch, bool)And at the KNS81 for the waypoint in use and the navigation mode I found no vars but I have pulled them out in KNS81.js with SetSimVarValue and my own vars. If I press my real buttons for the KNS81 it would be nice if I can hear the buttons working and see their animation (RNAV USE, RNAV DATA and so on) in the aircraft like the RNAV-CHECK button (L:var_RNAV_CHECKMODE_IsDown) but I found no variables.