Jump to content
The simFlight Network Forums

Gear stuck failure


ptinosq
 Share

Recommended Posts

Hello,

 

I'm wondering if there's some sort of offset which will completely disable control over individual gears (Nose, Left & Right). I'm currently using a system where I have a loop running every 25ms that sets the according offsets to their necessary values:

0BEC

0BF4

0BF0

 

This method works but also causes the animation in game to flutter as it's trying to lower the gear while my script is making it close. The nature of the loop also means that I'm getting a ridiculous amount of errors in my console where the connection to fsuipc is being opened but not closed fast enough before the next loop (Screenshot of pain: https://i.imgur.com/YRsPfGE.png )

 

Any help / ideas on how to get this system working more effectively would be absolutely fantastic.

- Tinos

Link to comment
Share on other sites

1 hour ago, ptinosq said:

I'm wondering if there's some sort of offset which will completely disable control over individual gears (Nose, Left & Right).

I very much doubt there's a way in MSFS -- there never was any way of doing that in FSX or P3D that i know of.  I think it would have to be implemented as a possibility in the individual add-on aircraft.

1 hour ago, ptinosq said:

This method works but also causes the animation in game to flutter as it's trying to lower the gear while my script is making it close.

25 mSecs is only 40 times per second. You'd probably need the sim running at 20 fps or less in order to even have a chance of not getting any flutter. You could try a lot faster, but i fear you'd then come up against the problems of the inter-process delays -- your program, FSUIPC and MSFS. You might be able to do it by writing your own WASM module running inside the simulator.

1 hour ago, ptinosq said:

The nature of the loop also means that I'm getting a ridiculous amount of errors in my console where the connection to fsuipc is being opened but not closed fast enough before the next loop

I don't understand what this is about. Why are you opening and closing the connection to FSUIPC? What are the errors?

Note that a simple Lua plug-in could run the repeats much faster than 25 mSec intervals.

Pete

 

Link to comment
Share on other sites

Hi Pete,

I've never worked with Lua plugins so I'm completely out in the dark with this. Could you forward me to some good resources to look at?

 

Also, how would one go about getting the plugin and code to interact? Would the plugin be treated similarly to an offset or would it work differently?

 

- Tinos

Link to comment
Share on other sites

3 hours ago, ptinosq said:

This method works but also causes the animation in game to flutter as it's trying to lower the gear while my script is making it close. The nature of the loop also means that I'm getting a ridiculous amount of errors in my console where the connection to fsuipc is being opened but not closed fast enough before the next loop (Screenshot of pain: https://i.imgur.com/YRsPfGE.png )

What scripting language (FSUIPC SDK?) are you using? And why are you opening and closing in the loop - probably better to open the connection, loop to send you gear retract/open commands, then close when done.

But I'm nor sure what you are trying to do in your script. Maybe it would be helpful if you let us know what you are trying to achieve and how...

Link to comment
Share on other sites

16 minutes ago, John Dowson said:

What scripting language (FSUIPC SDK?) are you using?

I'm using the node.js npm packaged so not any officially supported one.

The reason I'm opening and closing the loop is that the module uses asynchrous methods (promises) rather than synchorous methods so I need a new "object" every time therefore opening the connection every time.

Link to comment
Share on other sites

5 hours ago, Pete Dowson said:

Note that a simple Lua plug-in could run the repeats much faster than 25 mSec intervals.

I've been looking around the internet for some information on Lua plug-ins but I can't find anything to do with FSUIPC7/MSFS and how to install them.

 

Any help would be greatly appreciated 🙂

- Tinos

Link to comment
Share on other sites

13 hours ago, ptinosq said:

I've never worked with Lua plugins so I'm completely out in the dark with this. Could you forward me to some good resources to look at?

Look in the FSUIPC Documents folder first!! The FSUIPC implementation of Lua is pretty clearly laid out in the documents provided, and there are plenty of examples to look at in the ZIP file also provided. For the language itself there's the website www.lua.org and there are some good books too.

For what you want to do it's only really matter of a loop writing to the offset(s) using ipc.writeUD with the timing dictated by ipc.sleep. See the FSUIPC Lua library pdf.

Pete

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.