Jump to content
Sign in to follow this  
d.woody

Adding Spoilers to Aircraft

Recommended Posts

Hello AllI have added spoilers to a couple of aircraft that in real life are not fitted with them. The spoilers do not show in the external model of course, but after modifying the AIR and CFG files they work well and slow the aircraft appropriately (particularly during descent). The spoiler function itself works fine in both aircraft.My problem is that in one aircraft, the switch, which is a simple multi position lever with 5 positions, representing 0%, 25%, 50%, 75% and 100%, works fine, in the other aircraft, it doesn't.In the non-working aircraft, the switch works fine when the PAUSE mode is on, but when PAUSE is not on the lever just flutters. The only way I can get the spoilers to operate is to use the "/" button on the keyboard and hold it down. This will then activate the spoilers to 100% only and slow the aircraft.In the aircraft that works correctly, I have a separate gauge for the spoilers only, but in the one that doesn;t work the spoiler coding is incorporated into an Engine Control Unit gauge. I have tried removing it from the ECU gauge and using the separate gauge but the problem persists.This is the basic XML coding:<Element> <Select> <Value> (A:SPOILERS HANDLE POSITION,percent) 25 < if{ 0 } els{ (A:SPOILERS HANDLE POSITION,percent) 50 < if{ 1 } els{ (A:SPOILERS HANDLE POSITION,percent) 75 < if{ 2 } els{ (A:SPOILERS HANDLE POSITION,percent) 99 < if{ 3 } if{ 3 } els{ 4 } } } } } (>L:SpoilerHandleIndex,enum) </Value> </Select></Element><Element> <Image Name="Speedbrake.bmp" ImageSizes="30,23"> <Axis X="0" Y="10"/> </Image> <Shift> <Value Minimum="0" Maximum="100">(A:SpoilersHandle position, percent)</Value> <Nonlinearity> <Item Value="0" X="145" Y="182"/> <Item Value="25" X="145" Y="197"/> <Item Value="50" X="145" Y="212"/> <Item Value="75" X="145" Y="227"/> <Item Value="100" X="145" Y="242"/> </Nonlinearity> </Shift> </Element> <Area Left="145" Top="175" Width="30" Height="35"> <Cursor Type="DownArrow"/><Help ID="HELPID_GAUGE_SPEED_BRAKE"/> <Tooltip ID="TOOLTIPTEXT_SPEED_BRAKE"/> <Click>(L:SpoilerHandleIndex,enum) -- 0 max(>L:SpoilerHandleIndex,enum) '100' '75' '50' '25' '0' 5(L:SpoilerHandleIndex,enum) case 163.84 *(>K:SPOILERS_SET) </Click> </Area> <Area Left="145" Top="210" Width="30" Height="35"> <Cursor Type="UpArrow"/><Help ID="HELPID_GAUGE_SPEED_BRAKE"/> <Tooltip ID="TOOLTIPTEXT_SPEED_BRAKE"/> <Click>(L:SpoilerHandleIndex,enum) ++ 4 min(>L:SpoilerHandleIndex,enum) '100' '75' '50' '25' '0' 5(L:SpoilerHandleIndex,enum) case 163.84 *(>K:SPOILERS_SET) </Click> </Area>Any comments welcomeBuzzer

Share this post


Link to post
Share on other sites

Hi,Not tested, but try:

<Element><Select><Value>(A:SPOILERS HANDLE POSITION,percent) s0 25 <if{ 0 }els{l0 25 > 50 < andif{ 1 }els{l0 50 > 75 < andif{ 2 }els{l0 75 > 99 < andif{ 3 }els{ 4 }}}}(>L:SpoilerHandleIndex,enum)</Value></Select></Element>

Hope it helps,Jan

Share this post


Link to post
Share on other sites

Thanks JanThat made no difference, will still only work when PAUSE is on. Must be something in the MODEL that is causing this. Other aircraft work fine.Buzzer

Share this post


Link to post
Share on other sites

Don't forget that you need to put in a spoiler line into the aircraft.cfg file (and a spoiler drag value in the AIR file) to make the spoilers work.

Share this post


Link to post
Share on other sites

Strange that pause key?More likely there is more incorrect coding.

Share this post


Link to post
Share on other sites

I've modified the AIR and CFG files appropriately. The spoilers actually work but only when I hold down the / key. I can't get the lever to work to set the spoilers in steps. Works fine in another aircraft with the same coding.

Share this post


Link to post
Share on other sites

Try D. Dawson's "event-logger" to find out what is happening when arming the spoilers and what the lever is doing.May be some other coding is forcing the spoilers back when you use them.You have to fire the spoiler continuusly.file: event_logger.zip, here at Avsim.

Edited by phjvh

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...