Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Spoiler toggle

Featured Replies

Hi-

I've moved over to the newly textured Lear from my Falcon. I'm having a tough time getting the spoilers assigned to a button on my Thrustmaster.

I tried FSUIPC to do this,(in addition to 'Controls' in P3D) but that didn't work out either. Spoiler ON I think is what I assigned.

I also searched here and found a reference to aLUA script ( don't know what that is) that appears to do what I'm looking for.

Thanks,
Mark

9 minutes ago, newtie said:

Hi-

I've moved over to the newly textured Lear from my Falcon. I'm having a tough time getting the spoilers assigned to a button on my Thrustmaster.

I tried FSUIPC to do this,(in addition to 'Controls' in P3D) but that didn't work out either. Spoiler ON I think is what I assigned.

I also searched here and found a reference to aLUA script ( don't know what that is) that appears to do what I'm looking for.

Thanks,
Mark

According to page 7 of the FSW Lear35 Manual, you can assign a key or button to G1000_MFD_SOFTKEY6 to toggle the spoilers on and off. When ON in flight, they will open about 1/3 'of the way', when deployed on the ground (runway), they will open 'all the way'. The Spoilers are either on or off, they do not "arm" in any way.

Al

Edited by ark

  • Author

Hi Al-

Already did that and it didn't work which is when I went to FSUIPC. I'll look at this again when I get home.

It may be required to restart the sim after making or initiating a change. I tried the G1000 key assignment at the end of a long flight.

Thanks,

Mark

  • Author

No joy. Downloaded and reinstalled the latest version too.

One odd thing worth mentioning; after the assignment, clicking Button 8 on my TM, from outside view, the spoiler opens a small amount, then closes quickly.

Not sure if that's a clue or not.

Hi Mark,

One issue inherent with using the G1000 keys don’t let you see the animation if you’re watching from the outside... It deploys - but it won’t be visible until you toggle back to the outside view...

A better way to do it is using Al’s LUA - as it will allow you to view the animation real time - just send Al a PM kindly requesting them - with your email address - I find them extremely useful myself...

Regards,

Scott

imageproxy.png.c7210bb70e999d98cfd3e77d7

22 hours ago, newtie said:

No joy. Downloaded and reinstalled the latest version too.

One odd thing worth mentioning; after the assignment, clicking Button 8 on my TM, from outside view, the spoiler opens a small amount, then closes quickly.

Not sure if that's a clue or not.

The G1000 key assignment does work, just tried it. You do have to be inside the VC when using it (note the spoiler toggle switch to the right off the thrust levers moves), then you can go outside to see the "what happened". Make sure you are using the G1000_MFD_SOFTKEY6, not the PFD version.

Or, if you would prefer to use a Lua script, the following should do the job (assign a key or button to the script using FSUIPC):

Lear35Spoilers.Lua

  spoiler_switch=ipc.readLvar("L:SPOILER_SW")   --get current spoiler sw value; 1=on (spoilers extended), 0=off (spoilers retracted)
  if spoiler_switch==nil or (spoiler_switch~=0 and spoiler_switch ~= 1) then  
   ipc.writeLvar("L:SPOILER_SW",0)     --initialize spoilers switch to off (retracted)                 
  elseif spoiler_switch==1 then             
    ipc.writeLvar("L:SPOILER_SW",0)   -- spoiler sw was on, so turn spoiler sw off (to retract spoilers)  
    ipc.writeLvar("L:XMLSND70",1)     -- spoiler sw sound	 
  else
   ipc.writeLvar("L:SPOILER_SW",1)   --spoiler sw was off, so turn spoiler sw on (to extend spoilers)  
   ipc.writeLvar("L:XMLSND70",1)     -- spoiler sw sound
  end
  return

 

Or, I can send you the Lear35Controls2 Lua script that has 36 Lear functions (including the spoilers) that you can assign to keys or buttons using FSUIPC.

Al

 

 

Edited by ark

  • Author
15 hours ago, scottb613 said:

Hi Mark,

One issue inherent with using the G1000 keys don’t let you see the animation if you’re watching from the outside... It deploys - but it won’t be visible until you toggle back to the outside view...

A better way to do it is using Al’s LUA - as it will allow you to view the animation real time - just send Al a PM kindly requesting them - with your email address - I find them extremely useful myself...

Regards,

Scott

Hi Scott-

This was the problem all along. Using the switch/button while viewing from the outside.

13 hours ago, ark said:

Or, if you would prefer to use a Lua script, the following should do the job (assign a key or button to the script using FSUIPC):

Hi Al-

I would be interested in trying this, but not at all familiar with LUA scripts. Any pointers for newbies? :>)

Cheers,

Mark

3 hours ago, newtie said:

I would be interested in trying this, but not at all familiar with LUA scripts. Any pointers for newbies? :>)

Intro to Using FSUIPC to Assign a Key or Button to Activate (Run) a Lua Script

                                         (In the Modules folder, see the FSUIPC documentation for more info)

1.      Assume the Lua Script is named MyLuaScript.lua. Note a max of 16characteres is allowed in the name to the left of .lua.

2.      Using a TEXT editor like NotePad, save the MyLuaScript.lua script to the Sim’s Modules folder which is in the Sim’s root directory.

3.      Start the sim, load your aircraft and open FSUIPC from the Addons drop down list at the top of the sim window.

4.      You can now assign a key or button to run the MyLuaScript.lua script.

5.      Assume, just for example, you want to assign the Shift+Y key combination to run the MyLuaScript.lua script .

a.      Open the FSUIPC Key Presses tab.

b.      Check the Profile specific box if you want this assignment to only apply to a specific aircraft (or category of aircraft). If you don’t already have a profile for the aircraft, make up a profile name, e.g., LearJet35. Or leave the Profile specific box blank if you want the script to apply to all aircraft. See the FSUIPC documentation for more info on Profiles.

c.       On the left side of the FSUIPC window, click Set and enter the Shift+Y key combination into the window (just press the shift and Y keys together).

d.      On the left side of the window, click on the  Control sent when keys pressed drop down list and select Lua MyLuaScript from the list. Be very careful here, in the list you will also see ‘Lua variants’ like LuaKill MyLuaScript, LuaSet MyLuaScript, LuaToggle MyLuaScript , etc. Select only Lua MyLuaScript. See picture below.

e.      In the Parameter field enter 0 or leave it blank (some scripts may require a value here).

f.        If you don’t want the script to repeat if the key is held down, check the No repeats! box.

g.      Click the Confirm button, and then you will see the info filled in on the right side of the window.

h.      Since in this case we have no other key assignments to make, click OK to exit FSUIPC (If you did want to make more assignments, you would repeat the key assignment process until done and then exit FSUIPC).

i.        Now reopen FSUIPC and go to the Key Presses window and click Reload all keys to update FSUIPC to the new assignments. Sometimes you may have to actually restart the sim, but not usually.

 

6.      Assume now that you want to assign a button/switch instead of a key to run the MyLuaScript.lua script.

a.      Open FSUIPC and go to the Buttons + Switches tab.

b.      Perhaps check the Profile specific box as before if needed.

c.       Push the button you want to use to run the script (Y17 in the picture below).

d.      Check the Select for FS Control box.

e.      Using the drop down list under Control sent when button pressed , select Lua MyLuaScript from the list (again be careful to select just ‘Lua’). Again the Parameter field can be left empty. As required, Do or Don’t check the Control to repeat while held box.

f.        Click OK to exit FSUIPC.

g.      Reopen FSUIPC and in the Buttons +Switches window click on Reload all buttons to update FSUIPC on the new assignment, and then click OK to exit FSUIPC.

 Key Assignment

7c26fe77f5.png

 

Button/Switch Assignment

 b64618b9c3.png

 

     

Edited by ark

  • Author

Thank you very much for this Al.

It will be a great help and I'll give this a go later on this afternoon.

Have a good day!

Mark

1 hour ago, newtie said:

It will be a great help and I'll give this a go later on this afternoon.

Mark,

If you are not familiar with FSUIPC aircraft Profiles, you can do without that for now.  Doing so just means that if you were to run this script with an a/c other than the Lear, it is most likely that nothing will happen since the spoiler variable in the script is specific to the FSW Lear35.

Al

  • Author

I pretty much just fly the Falcon and Lear these days so I'm good there.

Outstanding aircraft as I'm sure you know. :>)

1 hour ago, newtie said:

I pretty much just fly the Falcon and Lear these days so I'm good there.

Outstanding aircraft as I'm sure you know. :>)

Ok, hope it works for you. If you have any questions with it, feel free to ask.

Al

  • 1 year later...

Hi,

I have tried the spoiler toggle switch on the quadrant, the G1000 assignment and the Lua script. They all work perfectly for me and regardless of the view. But they only work for one cycle. After I extend and retract there can be no further extensions. I can't find this issue anywhere in the forum so I am thinking a reinstall. Anyone have a different idea?

Dell Precision T3610, Windows 7 x64 + Windows XP x32 (dual boot)
Intel Xeon Processor ES-1620 v2, 4 core, 3.70 GHz
8GD DDR3-1600 
Nvidia GTX 960,  Dell U3011 (3560 x 1600 px) + Asus Pa245Q (1929 x 1200px)
FSX Acceleration

33 minutes ago, paradisca1 said:

Hi,

I have tried the spoiler toggle switch on the quadrant, the G1000 assignment and the Lua script. They all work perfectly for me and regardless of the view. But they only work for one cycle. After I extend and retract there can be no further extensions. I can't find this issue anywhere in the forum so I am thinking a reinstall. Anyone have a different idea?

You didn't say what sim you are using, but I just tried the spoilers on the ground and in the air with FSX,  P3D v4.5 and v5, and they work repeatedly both via the Lua script, and by clicking on the Spoiler switch in the VC.  I use Win10 so can't comment on what happens with Win7.

A couple of questions:

What sim?

Is this a new install of the Lear35 (v 4.3c), or a new problem with an existing install (i.e., did the spoilers ever work correctly)?

Are you using any 3rd party addons like Chaseplane, SimStarter, etc. If so I'd suggest turning them all off and see what happens. If the problems goes away, then add the addons back in one by one to find the conflict.

If after one successful cycle of the spoilers you click on the spoiler switch in the VC, does the switch fail to move, or does it move but the spoilers don't react?

Al

 

 

 

 

 

 

Edited by ark

Thank you. It is a new install on Windows 7 with P3Dv4.5. I do use Chaseplane . So I will try without Chaseplane and consider moving to Windows 10.

The switch always continues to move with mouse clicks but there is no other reaction. 

Incidentally I find after the first cycle if the switch is in the extend position the standard keypress "/" then works to toggle the spoilers. If the switch is moved to the retract position "/" no longer works. 

I hope I am clear.

Steve

 

 

 

Dell Precision T3610, Windows 7 x64 + Windows XP x32 (dual boot)
Intel Xeon Processor ES-1620 v2, 4 core, 3.70 GHz
8GD DDR3-1600 
Nvidia GTX 960,  Dell U3011 (3560 x 1600 px) + Asus Pa245Q (1929 x 1200px)
FSX Acceleration

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.