May 23, 20242 yr Hi, I thought it would be simple to program a toggle switch, press it to turn on windshield heat, press it again to turn it off. But I've tried both button and axes and I can get it to activate when I push down the button, but it deactivates when I release the button. Not sure what I'm doing wrong. Here's a screenshot: https://gyazo.com/0aaa6fb29ee18386dd5320352fa5371d any help would be appreciated. Kat
May 23, 20242 yr Commercial Member That is not how this works in AAO, the app doesn't have a built-in toggle feature. This toggle must be scripted. In case of this LVar, the RPN code will probably look like this: 1 (L:var_windshieldHeatSwitch, Number) - (>L:var_windshieldHeatSwitch, Number) Every time this script is called, the value of the LVar changes from 0 to 1 and 1 to 0 respectively. Create the script in a group of your choice, then assign it to the Key Down only. Key up is empty. Edited May 23, 20242 yr by Lorby_SI LORBY-SI
May 23, 20242 yr Author Thanks! I haven't created a script before, so I will read the documentation on how to do that. But, don't be surprised if I'm back eventually. Hopefully, as I spend more time with AAO, I'll have less questions. Kat
May 23, 20242 yr Commercial Member 1 hour ago, katchaplin said: Thanks! I haven't created a script before, so I will read the documentation on how to do that. But, don't be surprised if I'm back eventually. Hopefully, as I spend more time with AAO, I'll have less questions. Kat Make sure that AAO is connected to the sim and that you are sitting in the cockpit Open "Scripting->Script Editor" Copy and paste my code above into the big white box Use the "Test" button to see if it works Enter a "Title" for the script at the top and select a group, for example "Scripts". (you can create your own groups with the "Manage Script Groups" button. Press "Save as new" Open your button definition Delete the Key Up Open the Key Down selection, scroll down to the group that you've selected for the script, open the group, doubleclick on the title of your script LORBY-SI
May 24, 20242 yr Author Hi, I appreciate the instructions, now I have a script, yay! and I know how to do them, double yay!. But it still has the same issue. When I depress the button, the Windshield Heat activates, when I release the button it deactivates, rather than acting as a toggle. https://gyazo.com/9dcc0109fdbe315cf5df64945b6efb8e Kat Disregard, I still had the old button assignment. It works great now, thanks so much!!! Edited May 24, 20242 yr by katchaplin new information
May 24, 20242 yr Short press on. Long press off is how I handle push button for toggle. Right or wrong. 🙂
May 24, 20242 yr Commercial Member 2 hours ago, Adrian123 said: Short press on. Long press off is how I handle push button for toggle. Right or wrong. 🙂 ? Not sure if that depends on short and long click? There are about a dozen ways that something can be a toggle or at least operated as a toggle. That depends entirely on what the aircraft developer has implemented for that particular knob, button or lever in the cockpit. And there aren't only two-way toggles, there are many instances where people want to switch through more than two states with one momentary button (=cockpit switches with three or more positions). All this can be scripted in AAO, but it will look differently for every single use case. This "toggle" theme is the standard use case for all StreamDeck profiles, as the device only has momentary buttons. If you are looking for scripts for a certain aircraft, searching for a StreamDeck profile on flightsim.to is the best starting point. These profiles usually have a separate script file containing all those "toggles" that can be imported separately into AAO. (=you don't need to actually have a StreamDeck to use the scripts!) Edited May 24, 20242 yr by Lorby_SI LORBY-SI
May 29, 20242 yr I also utilize the 'long click, 1000ms' function for many off items, as it allows me to really think about what I'm turning off in case I'm about to make a mistake, ie autopilot needs a long click for off, as does run switches etc. Labeled with a small square next to the item on the xtouch overlay helps to remind which function requires it.
Archived
This topic is now archived and is closed to further replies.