-
How-to's on Youtube
I just uploaded a video on how to interface Axis and Ohs with DCS. Using AAO has allowed me to make my Arduino (well ESP32) driven screens and physical inputs (LeoBodnar) interact with DCS and MSFS without having to use different code on those devices. Video Link: https://youtu.be/vdvgaWZpIzc Topics Covered: Getting the Plugin Activating the Plugin Selecting a Plane in DCS Overview of the Plugin Adding a Variable from DCS Viewing Available Inputs to DCS L Variables and B Events in DCS Parking Brake Lever Example Synchronizing the Cockpit Using Aircraft Automated Scripts DCS Inputs I Have in AAO OpenKneeboard in AAO Limitations
-
Wow... Thanks Lorby!
Today I decided to tackle the transition to DCS for my physical cockpit after using AAO for MSFS and learning how to do things like use the webserver thing and pull variables from AAO using an Arduino (ESP32). Other than installing the DCS plugin and learning how DCS thinks from the included help document (L var and B event)- my cockpit works using the same code that I had used from MSFS. I have AAO using an aircraft script every 200ms and it just checks LED light conditions and sets the variables. The code just looks at those variables and turns on LEDs. For someone like me with a large physical cockpit - being able to use one app to rule them all is such a godsend. Thanks Lorby!
-
How-to's on Youtube
Thanks for the feedback - it's sometimes hard to know if those "down" and "up" LVARS are needed or not, so I tried to mirror what I saw in the dev mode. Now that you bring it up on another plane I noticed I didn't need the up event, so I will note it for an addendum on that one.
-
How-to's on Youtube
I just posted a video where I will go over how to bind nearly the entire plane using Axis and Ohs. The variables and events would work in any software that connects with MSFS 2024. Hope someone finds it useful. Video Link: https://youtu.be/S0Fz9cAAR1I GitHub Repo with an export of a template from this video: https://github.com/SimPitMaker/msfs_AAO_Binds/ Topics Covered: Axis-Based Controls and Brakes Quality of Life Binds Autopilot Mode Select Panel (MSP) and Course Heading Panel (CHP) Altitude/Vertical/Airspeed Speed Indicator and Radar Altimeter EICAS, Multifunction Display, and RTU (Comms) Control/Display Unit (CDU) Oxygen, Ice Protection, and Anti-Skid Master Warning/Caution and Extinguisher Engine Ignition, Props, Electrics, and Fuel Lighting Controlling the EFB with a Hat
-
FS2020 Longitude starters.
I've never used a streamdeck, but the A variable with the index, you'll need to replace that with a number for example (A:GENERAL ENG STARTER:1, bool) for engine 1. Sometimes they count from 0 so that may be engine 1.
-
How-to's on Youtube
Thanks for the kind words. Next video is up. (https://youtu.be/5Q4wuM_Qua4)This tutorial goes over the process of connecting an ESP32 and using an Arduino project to create a custom display altimeter that uses Axis and Ohs to get information from Microsoft Flight Simulator 2024. The altimeter has altitude, barometric pressure, an altitude bug, and I discuss how you can bind buttons in Axis and Ohs to change the pressure and altimeter bug. CHAPTERS 00:00 Introduction 01:14 Demonstration of Working Altimeter 03:15 Axis and Ohs WebAPI Setup 07:04 Discussion about required hardware 09:10 Github Project 09:40 Fusion Project and Encoders 11:30 Summary of Arduino Project 22:02 Connecting the Button in Axis and Ohs 26:24 Making the Sim Altimeter Bug Match the Display 28:50 How to convert the images for use in the project
-
Using json request overwrites when it pulls...
Awesome - thanks for the clarification. With how much I have your manual open I'm annoyed I missed the line at the top of page 163 that says pull will reset to zero. Sorry for the ping. Will get that project sorted out today then.
-
Using json request overwrites when it pulls...
Using 4.53 b19 and I'm working on a video to show how to use AAO for ESP32, and I've got AAO being connected wirelessly to the webapi and pulling altitude, instrument pressure setting, plane name, and a custom AAO L var for an altitude bug. When I pull the custom Lvar it overwrites it in AAO. So I thought I'd post as it seems like a bug. Below is a section of the relevant code where I create the Lvar part of the request and where I pull the data: // Create "pulllvars" array and add a variable object JsonArray pulllvars = jsonDoc.createNestedArray("pulllvars"); JsonObject bugObj = pulllvars.createNestedObject(); // This is a local AAO var, so no comma and variable type ", Number" bugObj["var"] = "(L:AAO_Altitude_Bug)"; bugObj["value"] = 0.0; ...make the http request... // Extract the custom AAO variables, in this case for the altitude bug JsonArray pullLvarsResponse = jsonResponse["pulllvars"]; // Should be the first variable in this group int currBugAlt = pullLvarsResponse[0]["value"].as<int>(); The loop is on a 200ms timer and below is the serialized result. You can see my other variables are working fine, you can even see where I've spun the encoder that in AAO increments the AAO_Altitude_Bug variable, as it can get a value but it is quickly overwritten with a 0. Using observe variables I can see me increasing it and it bouncing to 0 and if I disconnect the ESP32 the value stops being set to 0 and will stay at the properly incremented value. Response: {"deviceId":null,"axis":null,"buttons":null,"triggers":null,"getvars":[{"var":"(A:INDICATED ALTITUDE, feet)","value":13158.689453125,"clr":null},{"var":"(A:KOHLSMAN SETTING HG, inHg)","value":30.022851943969727,"clr":null}],"setvars":null,"pulllvars":[{"var":"(L:AAO_Altitude_Bug)","value":50.0,"clr":null}],"getstringvars":[{"var":"(A:TITLE, String)","value":"Pilatus PC-12/47 Fly7 OH-DEN","clr":null}],"setstringvars":null,"pullstringlvars":null,"scripts":null,"inits":null,"releasevars":null,"files":null,"commands":null} Response: {"deviceId":null,"axis":null,"buttons":null,"triggers":null,"getvars":[{"var":"(A:INDICATED ALTITUDE, feet)","value":13158.689453125,"clr":null},{"var":"(A:KOHLSMAN SETTING HG, inHg)","value":30.022851943969727,"clr":null}],"setvars":null,"pulllvars":[{"var":"(L:AAO_Altitude_Bug)","value":0.0,"clr":null}],"getstringvars":[{"var":"(A:TITLE, String)","value":"Pilatus PC-12/47 Fly7 OH-DEN","clr":null}],"setstringvars":null,"pullstringlvars":null,"scripts":null,"inits":null,"releasevars":null,"files":null,"commands":null} Response: {"deviceId":null,"axis":null,"buttons":null,"triggers":null,"getvars":[{"var":"(A:INDICATED ALTITUDE, feet)","value":13158.689453125,"clr":null},{"var":"(A:KOHLSMAN SETTING HG, inHg)","value":30.022851943969727,"clr":null}],"setvars":null,"pulllvars":[{"var":"(L:AAO_Altitude_Bug)","value":0.0,"clr":null}],"getstringvars":[{"var":"(A:TITLE, String)","value":"Pilatus PC-12/47 Fly7 OH-DEN","clr":null}],"setstringvars":null,"pullstringlvars":null,"scripts":null,"inits":null,"releasevars":null,"files":null,"commands":null} Response: {"deviceId":null,"axis":null,"buttons":null,"triggers":null,"getvars":[{"var":"(A:INDICATED ALTITUDE, feet)","value":13158.689453125,"clr":null},{"var":"(A:KOHLSMAN SETTING HG, inHg)","value":30.022851943969727,"clr":null}],"setvars":null,"pulllvars":[{"var":"(L:AAO_Altitude_Bug)","value":25.0,"clr":null}],"getstringvars":[{"var":"(A:TITLE, String)","value":"Pilatus PC-12/47 Fly7 OH-DEN","clr":null}],"setstringvars":null,"pullstringlvars":null,"scripts":null,"inits":null,"releasevars":null,"files":null,"commands":null} Response: {"deviceId":null,"axis":null,"buttons":null,"triggers":null,"getvars":[{"var":"(A:INDICATED ALTITUDE, feet)","value":13158.689453125,"clr":null},{"var":"(A:KOHLSMAN SETTING HG, inHg)","value":30.022851943969727,"clr":null}],"setvars":null,"pulllvars":[{"var":"(L:AAO_Altitude_Bug)","value":0.0,"clr":null}],"getstringvars":[{"var":"(A:TITLE, String)","value":"Pilatus PC-12/47 Fly7 OH-DEN","clr":null}],"setstringvars":null,"pullstringlvars":null,"scripts":null,"inits":null,"releasevars":null,"files":null,"commands":null} Response: {"deviceId":null,"axis":null,"buttons":null,"triggers":null,"getvars":[{"var":"(A:INDICATED ALTITUDE, feet)","value":13158.689453125,"clr":null},{"var":"(A:KOHLSMAN SETTING HG, inHg)","value":30.022851943969727,"clr":null}],"setvars":null,"pulllvars":[{"var":"(L:AAO_Altitude_Bug)","value":0.0,"clr":null}],"getstringvars":[{"var":"(A:TITLE, String)","value":"Pilatus PC-12/47 Fly7 OH-DEN","clr":null}],"setstringvars":null,"pullstringlvars":null,"scripts":null,"inits":null,"releasevars":null,"files":null,"commands":null} Response: {"deviceId":null,"axis":null,"buttons":null,"triggers":null,"getvars":[{"var":"(A:INDICATED ALTITUDE, feet)","value":13158.689453125,"clr":null},{"var":"(A:KOHLSMAN SETTING HG, inHg)","value":30.022851943969727,"clr":null}],"setvars":null,"pulllvars":[{"var":"(L:AAO_Altitude_Bug)","value":0.0,"clr":null}],"getstringvars":[{"var":"(A:TITLE, String)","value":"Pilatus PC-12/47 Fly7 OH-DEN","clr":null}],"setstringvars":null,"pullstringlvars":null,"scripts":null,"inits":null,"releasevars":null,"files":null,"commands":null} I think what I'm doing should work as I can get the data briefly, but not sure how to stop it from getting set to 0. Any thoughts? Thanks!
-
How-to's on Youtube
(https://youtu.be/3A7u2ym8rzQ) New one covering Templates, Buttons, and Toggle Switches: By the end, you'll have the Diamond DA40 flyable and can use it as a model for binding other basic planes. We'll start this discussion with how to create and use templates so we can save time and get a plane up and running faster using our previous work. Then I cover switches considering the value of toggle and set along with standard events versus B variables. Then we learn 3 ways to do repeating commands with pitch trim. We learn how to combine actions into a single button press with the master engine switch. Finally, we cover how to use logic to bounce something between two states using a single button.
-
How-to's on Youtube
If it's ok with Lorby, I started making videos on how to use Axis and Ohs in MSFS2024. I have time this summer to create a playlist of items - and as I build my own cockpits my plan is to cover doing things like connecting Arduinos and all of that. I'm done with MSFS for binding and use AAO for everything, so my content covers getting the full plane put into AAO - at least as I've experienced it. (https://youtu.be/dm19ALfaPUk) This is an introduction to the kinds of events and variables that you will need to know about in Microsoft Flight Simulator 2024 in order to use Axis and Oh's to connect your hardware to the sim. (https://youtu.be/teeP5hUvJjU) This is an overview of how to bind and tweak an axis using Axis and Ohs in Microsoft Flight Simulator 2024. We will do basic axis in a Cessna 152, split throttle in Beechcraft Starship, thrust reversers in Learjet 35A, non-flight controls, and finally multiple control surfaces with one axis in the Pilatus PC-12. The last example I'll go into more detail in the next video as we need to talk about scripting a bit.
-
AAO Lvars porocessing not working
I had posted a question a while back about using an ESP32 and Lorby brought up using the webapi for it as those devices support wifi. Just this weekend I got around to looking at that. So my first comment is - what arduino are you using because a Mega or Uno need supplemental boards to be able to do http requests. If you're using an ESP32 then here is a sketch that will show an approach to get data from the sim (I'm using MSFS 2024). This example pulls just the title of the airplane. I started with it because my biggest issue at the moment is each airplane uses different variables so I will need to have plane detection so I can pull the right data for my small displays (cabin pressure, hydraulic pressure, brake pressure, etc..). EDIT: I will also say that you should download one of Lorby's example webpages (like the buttonexample one) and open that from a non-sim PC to make sure your port forwarding and such are working. If you can't using one of those example pages you have firewall or other issues. I'm also using the latest AAO. #include <WiFi.h> #include <ArduinoJson.h> #include <HTTPClient.h> // Replace with your network credentials const char* ssid = "YourSSIDHere"; const char* password = "YourPassHere"; const char* serverUrl = "http://YourIPHere:43380/webapi"; void setup() { // Only needed for debugging using serial monitor Serial.begin(115200); // Set WiFi mode to Station WiFi.mode(WIFI_STA); // Start connecting to the WiFi network WiFi.begin(ssid, password); Serial.println("Connecting to WiFi..."); // Wait until connected while (WiFi.status() != WL_CONNECTED) { delay(1000); Serial.print("."); } // Print the local IP address once connected Serial.println("\nConnected!"); Serial.print("ESP32 IP Address: "); Serial.println(WiFi.localIP()); } void loop() { // Send JSON request if (WiFi.status() == WL_CONNECTED) { HTTPClient http; http.begin(serverUrl); // Specify the server URL http.addHeader("Content-Type", "application/json"); // Set content type to JSON // Create JSON object JsonDocument jsonDoc; // Create the 'getvars' array JsonArray getvars = jsonDoc.createNestedArray("getstringvars"); // Create an object inside of the array JsonObject item = getvars.createNestedObject(); item["var"] = "(A:TITLE, String)"; item["value"] = ""; // Serialize JSON to string String jsonString; serializeJson(jsonDoc, jsonString); // Send POST request int httpResponseCode = http.POST(jsonString); // Handle response if (httpResponseCode > 0) { String response = http.getString(); Serial.println("Response:"); Serial.println(response); deserializeResponse(response); } else { Serial.print("Error on sending POST: "); Serial.println(httpResponseCode); } http.end(); // Free resources } // update every second delay(1000); } void deserializeResponse(String response) { JsonDocument doc; DeserializationError error = deserializeJson(doc, response); if (error) { Serial.print("JSON Deserialization failed: "); Serial.println(error.c_str()); return; } // Extract the value from getstringvars JsonArray getstringvars = doc["getstringvars"]; if (!getstringvars.isNull() && getstringvars.size() > 0) { String aircraftTitle = getstringvars[0]["value"].as<String>(); // Store the value in a string Serial.println("Aircraft Title: " + aircraftTitle); } else { Serial.println("getstringvars is null or empty"); } }
-
SWS PC-12 Aileron Rudder Interconnect
(Edited the below to change from a question to more of a checking my logic kind of thing.) It'd be nice to have the aileron rudder interconnect work like it is designed to, and I think figured out a solution. The reason for this effort is that all of my other planes I have mapped in AAO for everything and this one plane currently needs to have the aileron and rudder mapped in-game so I have to switch the binds every time I switch planes. Here's what I've sorted... Set rudder axis to a float output from -1 to 1 and have it go to L:ARI_RUDDERINPUT. Set aileron axis to a float output from -1 to 1 and have it go to L:ARI_AILERONINPUT Everything looks great and even blends in sim, but I know one other variable changes due to the blending of these axis and its L:HANDLING_AileronRudderInterconnect. Currently that does not update like it should and my guess is something I can't see would be broken. What I've found in their files (and seems to match the behavior in the sim) is this code: (L:ARI_RudderInput, Percent) abs (L:ARI_AileronInput, Percent) abs max (>L:HANDLING_AileronRudderInterconnect, Percent) Basically look at the absolute value of both axis and set the variable to whichever is biggest. So what I've done is create an airplane automated script to run at 50ms with the above line and it seems to work. So I'll continue testing but if anyone else is fiddling with this idea it might be a way to handle it and keep all things in AAO (my preference).
-
Delay When Editing/Adding
I was experiencing lag and after reading your reply I went into my database folder: C:\Users\hadro\AppData\Local\LORBY_SI\LorbyAxisAndOhsMSFS24 and see a "DeviceBlacklist_MSFS2024.xml" and it has the devices in there. I closed AAO and reopened and still had lag (double-click on a bind, hit cancel and it takes 20 seconds to be responsive) - checked the file and it still had entries. Went to the blacklist device menu and all devices were in the left column. Should it be reading the blacklist xml and prepopulating the right column? I did ignore again (no observable change in the blacklist xml) and its fine. So its like it isn't reading the file on my end or something. I'm running it with admin privileges where I have to approve the UAC dialog when I run it. It works great if I do the ignore (like 2 seconds between leaving a submenu back to the main binds window). I'll put my device list below in case there is something of value there. If it's something you want to dig into more just tell me and I'll help however I can. Not sure if I'm a weird edge case or something. <?xml version="1.0" encoding="utf-8"?> <DeviceBlacklist xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <devices> <DisabledJoystick> <InstanceGuid>0283bb00-f8e9-11ee-8006-444553540000</InstanceGuid> <MidiDeviceId>0</MidiDeviceId> <InstanceName>CORSAIR Slipstream Multi-Device Receiver</InstanceName> </DisabledJoystick> <DisabledJoystick> <InstanceGuid>0283e210-f8e9-11ee-8007-444553540000</InstanceGuid> <MidiDeviceId>0</MidiDeviceId> <InstanceName>CORSAIR Slipstream Multi-Device Receiver</InstanceName> </DisabledJoystick> <DisabledJoystick> <InstanceGuid>caab6220-f8e6-11ee-8001-444553540000</InstanceGuid> <MidiDeviceId>0</MidiDeviceId> <InstanceName>Corsair ST100 Headset Output</InstanceName> </DisabledJoystick> <DisabledJoystick> <InstanceGuid>ff6bf580-e2b4-11ee-8006-444553540000</InstanceGuid> <MidiDeviceId>0</MidiDeviceId> <InstanceName>Corsair composite virtual input device</InstanceName> </DisabledJoystick> <DisabledJoystick> <InstanceGuid>41b850c0-e2f4-11ee-8001-444553540000</InstanceGuid> <MidiDeviceId>0</MidiDeviceId> <InstanceName>ButtKicker PRO</InstanceName> </DisabledJoystick> <DisabledJoystick> <InstanceGuid>ff6bf580-e2b4-11ee-8005-444553540000</InstanceGuid> <MidiDeviceId>0</MidiDeviceId> <InstanceName>HID-compliant consumer control device</InstanceName> </DisabledJoystick> <DisabledJoystick> <InstanceGuid>ff6c43a0-e2b4-11ee-800a-444553540000</InstanceGuid> <MidiDeviceId>0</MidiDeviceId> <InstanceName>CORSAIR iCUE LINK AIO LCD Screen Module</InstanceName> </DisabledJoystick> <DisabledJoystick> <InstanceGuid>475fe1b0-0585-11ef-8003-444553540000</InstanceGuid> <MidiDeviceId>0</MidiDeviceId> <InstanceName>CORSAIR DARKSTAR RGB WIRELESS Gaming Mouse</InstanceName> </DisabledJoystick> </devices> </DeviceBlacklist>
-
How to make an increment (++), multiplied by 10
An example of the plane "expecting" it, the FlySimWare Lear 35A has a 100 and 1000 mode on the altimeter. So I press on one of my encoders to toggle the state using the event the plane expects and run this script for decrease (increase has a + in it instead with 99900 min) when I rotate it. I just nabbed the code from the update code in the behaviors console thing. (L:ALERTER_DIAL_DIGITAL_CUSTOM_L_sec,·Number)·0·==·· if{(L:ALERTER_DIGITAL,·Number)·100·-·0·max·(>L:ALERTER_DIGITAL,·Number)} (L:ALERTER_DIAL_DIGITAL_CUSTOM_L_sec,·Number)· if{(L:ALERTER_DIGITAL,·Number)·1000·-·0·max·(>L:ALERTER_DIGITAL,·Number)} I have also had luck with using a local variable that keeps track of a 100/1000 state that toggles when I press a button, then I just use the _Inc option on a Bvar. So rather than trying to spin the knob 10 times, maybe find the variable the knob is changing and change it directly?
-
Delay When Editing/Adding
Is there a way for it to remember the blacklist items? I seem to need to redo the list each time it starts. I guess with devices changing maybe that would cause an issue or something. I just turn off my sim pc when I'm done flying so going through the blacklist is just another task on startup. Works great though when I nuke all of the non-controller items though.
HadronFlux
Members
-
Joined
-
Last visited