ptinosq Posted June 13, 2021 Report Posted June 13, 2021 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
Pete Dowson Posted June 13, 2021 Report Posted June 13, 2021 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
ptinosq Posted June 13, 2021 Author Report Posted June 13, 2021 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
John Dowson Posted June 13, 2021 Report Posted June 13, 2021 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...
ptinosq Posted June 13, 2021 Author Report Posted June 13, 2021 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.
ptinosq Posted June 13, 2021 Author Report Posted June 13, 2021 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
Pete Dowson Posted June 14, 2021 Report Posted June 14, 2021 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now