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.

FSUIPC and LUA scripts for the C90?

Featured Replies

I am trying to get all the controls for the C90 out onto my sim switch panels and it's proving to be rather challenging. I have been able to get most working, but I'm having a bear of a time with a few like Master Caution, Master Warning, and Transfer Test. Another example, I have the wipers working on a rotary switch on my panel, but can not find the code to park them when off. The run with the correct animation and sound in sync, but when I go to the off position they stop where they are and don't park.

 

FSUIPC can handle many with the native FSX facilities or the extended FSUIPC offsets. For the rest I'm dabbling (for only the second time) in lua scripts and while I've had some successes there are a half dozen switches like those above that are eluding me.

 

I'm hoping that someone far smarter than I and more skilled with FSUIPC and LUA may have some scripts or maybe some documentation to share regarding the LUA code needed.

 

Thanks!

Tom G.

Tom G.

I hope someone rolls in and says that I'm wrong, but the "Park" function doesn't work despite having a active click spot for it. Does yours work when it's activated from the screen click spot?

 

I have a quick question for you - have you been able to find or write a code for the "Stall Warn Heat" switch? That function and switch seemed to have evaded the attention of the FSX developers... It isn't in the List Of FSX Controls from FSUIPC - I can't find one anywhere.

 

Thanks,

 

Mark

  • Author

I hope someone rolls in and says that I'm wrong, but the "Park" function doesn't work despite having a active click spot for it. Does yours work when it's activated from the screen click spot?

 

I have a quick question for you - have you been able to find or write a code for the "Stall Warn Heat" switch? That function and switch seemed to have evaded the attention of the FSX developers... It isn't in the List Of FSX Controls from FSUIPC - I can't find one anywhere.

 

Thanks,

 

Mark

 

There are many functions that eluded the FSX developers. I don't think they had any idea how far we would stretch FSX. As a result many of the Add On developers like Carenado have had to write their own custom code to make functions work. FSUIPC will easily tap all the FSX native functions but as its developer says, there are many it will not. For those he has added the lua scripting language and that's how I'm getting at many of the Carenado panel switches. My challenge is I don't know lua so I'm reverse engineering things using the lua log function to capture switch actions or reverse engineering scripts that other people have been generous enough to share. In the process I'm learning about lua scripting, but it is a painful uphill battle in someways.

 

The Park function does appear to work in the 2D and 3D views. I tested this by using my panel switch to run the wipers and shut them down in the middle. Then went up on the overhead and left clicked the knob to the park setting. The wipers pulled back to the park position.

 

There's one piece of code ( L:ASD_KNOB_WINDSHIELD_WIPER_KEYFRAME=0 ) I see in the lua log each time I use Park or Off from the overhead and I'm sure it's the key to this but I can't figure out how to send it from my script. Each time I try to add it as an ipc.writeLvar statement it crashed the script????

 

Regarding the Ice Protection switches I hadn't gone that far yet. But, while typing this reply I ran a lua log and operated the Stall Warn switch. The code that seems to be associated with it is "L:SWITCH_STALL_LIGHT=1" so I put that in my test script as follows and I am able to operate the Stall Warn Ice Protection switch with my button 19.

 

if ipc.testbutton(3,19) == true then
 ipc.writeLvar("L:SWITCH_STALL_LIGHT",1)
elseif ipc.testbutton(3,19) == false then
 ipc.writeLvar("L:SWITCH_STALL_LIGHT",0)
end

 

Hope that helps!

 

Now if I could just figure out those other functions . . .

Tom G.

Create an account or sign in to comment

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.