Fragtality / PilotsDeck

Directly control the FlightSim from your StreamDeck via FSUIPC!
Other
91 stars 6 forks source link

Sepcial address for AN225 #26

Closed AsukaBlackbird closed 1 year ago

AsukaBlackbird commented 1 year ago

HI, I’m try to create a panel for AN225. I find dev create a special addres like this.

Mach climb: (A:AUTOPILOT FLIGHT LEVEL CHANGE, Bool) if{ (L:XMLVAR_AirSpeedIsInMach) AirSpeedIsInMach may set at 1

IAS climb:\ (A:AUTOPILOT FLIGHT LEVEL CHANGE, Bool) if{ (L:XMLVAR_AirSpeedIsInMach) AirSpeedIsInMach may set at 0

How can fill this to address for control states?

Fragtality commented 1 year ago

I don't really understand RPN Code, but I see either an A-Var or L-Var that could be read and that it will be either 1 or 0. So it is more or less copy & paste.

You are sure you have read and understood the Readme?

AsukaBlackbird commented 1 year ago

I try to learn from Readme, but English not my mother tongue. So, some part of that is too difficult to understand, please forgive me. What I want to describe is, it have a control states when AUTOPILOT FLIGHT LEVEL CHANGE is 1 as same time XMLVAR_AirSpeedIsInMach is 1, the Mach climb light is on. As same for IAS climb when XMLVAR_AirSpeedIsInMach is 1 and if MLVAR_AirSpeedIsInMach is 0, the AS climb Light is on.

AsukaBlackbird commented 1 year ago

https://drive.google.com/file/d/1E_9vTj66aqWSipmLyCmOidLJP0p7q2wV/view?usp=sharing https://drive.google.com/file/d/1NXFnFphwsZHFILaleWISMINm6OIHi0Co/view?usp=sharing I hope those two photo can help you to understand. I read the Readme very carefully, but my ability is limited. Can you help me complete the correct content that needs to be fill?

Fragtality commented 1 year ago

Oooh - So the state is defined by two Variables? That is a little more work:

You would need to follow the "Using Values from Lua" Example. You need to read & evaluate the Values in Lua and then write the Result to a free Offset (which then can be read by the Plugin). If the A-Var is not available as Offset per Default, you need to add it with the "myOffsets.txt" File.

P.S: Can't access the Photo's you have linked. Consider to attach them directly in your Message (just drag & drop or paste it)

AsukaBlackbird commented 1 year ago

Yes, state is defined by two variables. I search all SDK Documentation, it have not single variable to define state. Until I find this page, I can understand why I can't find a single variable, DEV use multiple Variables to make the Light ON.

https://docs.flightsimulator.com/html/Content_Configuration/Models/ModelBehaviors/TemplateExplorer/Asobo/Common/Subtemplates/Autopilot_Subtemplates.html?rhhlterm=LEVEL%20CHANGE&rhsearch=LEVEL%20CHANGE

AP-225-1 AP-225-2

Fragtality commented 1 year ago

Well, you don't need to dive into the general SDK Documentation, I don't think that will help. The only thing interesting there is the List of all Simulation Variables (aka A-Vars): https://docs.flightsimulator.com/html/Programming_Tools/SimVars/Simulation_Variables.htm

Check if there is Documentation for the Plane, e.g.: https://forum.inibuilds.com/topic/18326-hardware-commands-lvars/ Use FSUIPC to list all L-Vars - maybe there is a single L-Var where this State could be read from? Based on this Post there seem to be plenty of L-Vars: https://forum.inibuilds.com/topic/18427-lvars-list-for-an225/

Sometimes it's just trial and error finding the right Variable to read from! E.g. watching different L-Var / A-Vars that might hold that Information with "Display Value" Actions.

AsukaBlackbird commented 1 year ago

I tried use this way. Search each value =1 and which named have connection with IAS and Mach climb. I find very interesting thing, state of AN225_AP_CRS_COMMAND is AN225_AP_CRS_BUTTON_LIGHT, state of AN225_PITCH_LEVEL_COMMAND is AN225_AP_PITCH_HOLD_LIGHT. Depend on inibuilds forum IAS climb is AN225_AIRSPEED_COMMAND (LVAR) (1 = Trigger button). I find out this AN225_AIRSPEED_BUTTON_LIGHT, I tried to set to '1' but nothing happen. Here is L-Vars logs. FSUIPC7.txt

Fragtality commented 1 year ago

Sometimes L-Var for Trigger-Buttons (i.e. the snap back when not pressed) must be written accordingly. So they have to be set to 1 (pressed) and back to 0 again (not pressed anymore). That's why there is a "Reset Button" Option! Maybe that helps with these Variables?

Maybe you better ask this in the inibuild Forum? I can't really help with a Plane which I don't have or know.

AsukaBlackbird commented 1 year ago

Thank you for help me to understand some part how to works. You are right, the easiest way is ask in the ini build forum. I will also do more tests. Thank you very much for your patience in answering my questions. I will do my best to finish this project for AN225 and post to flightsim.to. You will on my special thanks list!!