Jump to content
Sign in to follow this  
Wightleal

Auto prop pitch gauge

Recommended Posts

Hi,This is my first post - hope someone can help. I need an XML gauge to automatically set prop pitch to high whenever the flaps are in the zero (fully retracted) position. I've tried a few bits of code like:%(A:FLAPS HANDLE INDEX,number) 0 == %(>K:AXIS_PROPELLOR_SET=13763) %(>K:AXIS_PROPELLOR_SET=16384)%but no joy. It may be because the accompanying syntax is wrong.I'm new to XML, and would appreciate a bit of coaching!

Share this post


Link to post
Share on other sites
Hi,This is my first post - hope someone can help. I need an XML gauge to automatically set prop pitch to high whenever the flaps are in the zero (fully retracted) position. I've tried a few bits of code like:%(A:FLAPS HANDLE INDEX,number) 0 == %(>K:AXIS_PROPELLOR_SET=13763) %(>K:AXIS_PROPELLOR_SET=16384)%but no joy. It may be because the accompanying syntax is wrong.I'm new to XML, and would appreciate a bit of coaching!
First, this question really belongs in the "Aircraft and Panel Design" forum, because that's where XML gauge scripting is covered.Second, your syntax is completely incorrect:
(A:FLAPS HANDLE INDEX,number) 0 ==  	 if{ 16384 (>K:AXIS_PROPELLOR_SET)

XML scripting uses "Reverse Polish Notation" (RPN). The prototype for all conditional commands is:

(Condition) if{ (>K:DoSomething) }

In "normal forward notation" this is:

if (Condition) is TRUE then (>K:DoSomething)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

I told you I was new! Many thanks for your prompt response - I remember RPN now from college 100 years ago! I haven't made it work yet, but I've started my revision course.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...