September 7, 20223 yr 16 hours ago, JRBarrett said: You do realize that you have responded to a post that is 17 years old? Yup. Never too late to emphasize the obvious. Thanks Jim
September 8, 20223 yr Moderator On 9/6/2022 at 7:21 AM, JRBarrett said: You do realize that you have responded to a post that is 17 years old? Good Lord! Have I really been around that long! 🤣 Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
September 12, 20223 yr On 9/8/2022 at 7:51 AM, n4gix said: Good Lord! Have I really been around that long! 🤣 Father Bill, I always enjoy your posts and yes, we old timers, have been here since the Avsim conception. Bill, I follow your posts quite often on the FSDeveloper website and have learned quite a bit about XML coding from your many examples. I enjoy reading your posts and then trying to recreate an examples you have provided. In the last 6 months I have garnered an elementary understanding of XML and the subtle differences that exist among other languages. I know........ what am I after. Well Sir, I have exhausted at least 20 hours trying to accomplish a task that perhaps is unattainable. I use LevelD-767 exclusively in the simulator. Many of the default FS variables work alongside LevelD's own coding. Variables such as TAT, OAT, Throttle, reversers, park brake, ground speed, airspeed, etc. That said, I have been unable to accomplish a small task. The task is I wish to display certain conditions on a HUD that EDetroit help me develop. I'm not trying to have the code change any settings within the simulation. Merely to evaluate and display the condition in a form of an annunciator on the hud. What I am trying to do, and to date, I have 2/3rds of the code working. I wish for the SPEEDBRAKE to show the following conditions when the lever is moved. HANDLE UP - Display nothing HANDLE ARMED - Display "SPBRK ARMED" HANDLE DEPLOYED - Extinguish SPBRK ARMED and display "SPEEDBRK". But what happens is "SPBRK ARMED" & "SPEEDBRK" display togather. URGHHHHHHHHHHH. I've tried everything. Once the Speedbrake handle is extended the "SPDBRAKE ARMED" dissapears as it should. It is just when the handle is moved to the ARM mode they display togather. Here is my code: <Element> <!-- SPEED BRAKE --> <Visible>(A:SPOILERS ARMED, bool) != (A:Spoilers Right Position, percent) 1 < && </Visible> <Position X="212" Y="828"/> <Text X="130" Y="28" Bright="Yes" Length="22" Font="Arial" Color="#D0FF00" Adjust="Center" VerticalAdjust="Center"> <String>SPBRK ARMED</String> </Text> </Element> <Element> <!-- SPEED BRAKE ON --> <Visible>(A:SPOILERS HANDLE POSITION,percent) /10 <</Visible> <Position X="209" Y="850"/> <Text X="130" Y="28" Length="18" Font="Arial" FontSize="21" Color="#D0FF00" Adjust="Center"> <String>SPEEDBRK</String> </Text> </Element> <Element> <!-- REVERSERS --> <Position X="212" Y="820"/> <FormattedText X="130" Y="28" Length="18" Font="Ar Many thanks Father. Michael Edited September 12, 20223 yr by n4gix Added [code] box tags to display XML format properly.
September 12, 20223 yr Moderator 4 hours ago, PebbleBeach said: But what happens is "SPBRK ARMED" & "SPEEDBRK" display togather. URGHHHHHHHHHHH. I've tried everything. Once the Speedbrake handle is extended the "SPDBRAKE ARMED" dissapears as it should. It is just when the handle is moved to the ARM mode they display togather. I'll have to give this a this a bit to get my nurons synchronized to give a proper examination to the question. There is a danger in using different token variables to evaluate visible conditions. At a quick glance though have you tried inverting the deployed condition, e.g., <Visible>(A:SPOILERS HANDLE POSITION,percent) / 10 ></Visible> Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
September 12, 20223 yr 8 hours ago, n4gix said: At a quick glance though have you tried inverting the deployed condition, e.g., Hi Bill, You will have to excuse my ignorance but I'm not really sure what that means. Michael
September 13, 20223 yr Moderator Instead of checking for "less than" check for "greater than." That's assuming that when speed brakes are deployed, the token variable will be 100%. In other words, 10 < will be true even while the speed brakes are "armed" and false while the speed brakes are fully deployed. I'm not able to check this myself since I haven't got my sim set up after moving to Arkansas a few months ago. Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
September 14, 20223 yr 11 hours ago, n4gix said: Instead of checking for "less than" check for "greater than." That's assuming that when speed brakes are deployed, the token variable will be 100%. In other words, 10 < will be true even while the speed brakes are "armed" and false while the speed brakes are fully deployed. Father Bill, Thank you again for the reply and suggestion. I tried replacing the 10 < with 10 > and it didn't change anything. "SPEEDBRK" continues to illuminate when "SPDBRK ARMED" is selected. Playing around I also tried the following: 100 >, /100 >, 100 <, etc. etc. None worked. Michael
September 14, 20223 yr Moderator I will have to give it some additional thought then. I haven't delt with XML scripting for several years, so... 😲 Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
September 14, 20223 yr 5 hours ago, n4gix said: I will have to give it some additional thought then. I haven't delt with XML scripting for several years, so... 😲 Father Bill, IT WORKS!!!! I had more time to invest in testing today. And you were right. Checking the "greater than" value and adjusting the percentage made the difference. Thank you so much. Working code below......... Michael <Element> <!-- SPEED BRAKE ARMED --> <Visible>(A:SPOILERS ARMED, bool) != (A:Spoilers Right Position, percent) 1 < && </Visible> <Position X="212" Y="828"/> <Text X="130" Y="28" Bright="Yes" Length="22" Font="Arial" Color="#a6bf00" Adjust="Center" VerticalAdjust="Center"> <String>SPBRK ARMED</String> </Text> </Element> <Element> <!-- SPEED BRAKE ON --> <Position X="209" Y="850"/> <FormattedText X="130" Y="28" Bright="Yes" Length="18" Font="Arial bold" FontSize="21" Color="#a6bf00" Adjust="Center"> <String>%((A:SPOILERS HANDLE POSITION,percent) 50 >)%{if}\{blnk}SPEEDBRK\{nr}%</String> </FormattedText> </Element>
September 15, 20223 yr Moderator 3 hours ago, PebbleBeach said: <String>%((A:SPOILERS HANDLE POSITION,percent) 50 >)%{if}\{blnk}SPEEDBRK\{nr}%</String> Yay! I'm happy to know that I'm not totally brain dead after all... 🤪 I'm also delighted that you've discovered the joy of <FormattedText> as well! Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
September 15, 20223 yr 7 hours ago, n4gix said: Yay! I'm happy to know that I'm not totally brain dead after all... 🤪 Your far from brain dead. You sir, are a legend!!! Michael
September 21, 20223 yr Father Bill, Sorry. Calling upon your knowledge AGAIN. I'm trying to read variables in flight sim and have them display on the HUD I previously informed you about. I am attempting to display "AP" on the HUD when autopilot is engaged. The code I used: <Element> <Visible>(A:Autopilot master, bool)</Visible> <Position X="10" Y="10"/> <Text="Yes" X="18" Y="9" Length="2" Font="Arial" Color="#00FF00" Adjust="left"> <String>AP</String> </Text> </Element> DOES NOT WORK. - Well actually it does on default FS2004 aircraft. However, I'm using the commercial LevelD-767 software which has it's own SDK. Again, with the default FS2004 aircraft it works perfectly. BUT on the LevelD-767, "AP" does not display when autopilot is engaged. Hitting the "Z" keyboard button, which does control the autopilot master on both aircraft versions, only makes "AP" flash but remains off on LevelD-767 aircraft. Some background: Our simulator uses a completely different programming language to interface all our hardware such as, lights, switches, toggles, sounds, radio frequencies, annunciators, etc. etc. This interfacing program was written by Ralph Robinson (EPIC CARD) specifically for our simulator. And this interfacing program was written to read and write based on the information within the LevelD-767 SDK. With all this said, perhaps attempting to read a LevelD-767 variable is not possible in XML. I do not know. I've tried this code pulling info from the LevelD-767 SDK: <Element> <Visible>(LVLD_AP_MASTER,enum)</Visible> <Position X="10" Y="10"/> <Text="Yes" X="18" Y="9" Length="2" Font="Arial" Color="#00FF00" Adjust="left">LevelD-767 SDK <String>AP</String> </Text> </Element> AND MANY VARIATIONS similar to this code. The best I could get was the same result I got with the FS2004 SDK. Hitting the "Z" keyboard button, which does control the autopilot master on both aircraft versions, only makes "AP" flash but remains off on LevelD-767 aircraft. So my question to you is......... Is this possible or should I scrap this plan? I am attaching the LevelD-767 SDK variables file in case you have extra time to evaluate this issue. Respectfully, Michael LevelD-767 SDK FILE
Create an account or sign in to comment