• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA Fighting Sim interference

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
So i made a intruiging discovery this morning while working on a custom gear retraction sequence using Simconnect.

In order to get the timing right I was working off the PANEL_SERVICE_PRE_UPDATE case in my gauge callback function which executed my gear position function at 18Hz. However I was getting a vibration on the gear caused by the sim trying to move the gear on its own instead of letting simconnect handle it. However when i switched to using the TICK18 module var for timing and put the gear position function in the PANEL_SERVICE_PRE_DRAW case, the vibration went away. It seems that the PRE_DRAW case is kept in sync with the frame rate and is executed along with the frame buffer swap of DirectX, effectively wiping out any interference from the sim. So combining simconnect and gauges can be handy.
 
Be careful... putting code in the rendering cycle that isn't actually rendering can result in major frame rate loss.
 
Are you still using the default KEY_GEAR_UP and KEY_GEAR_DOWN events, along with the corresponding XML tokens for c_gear, etc.?

If so, then that's why the sim was trying to "interfere" with your code...
 
I have to use the key events otherwise i have to constantly force the gear down/up which takes away gear compression and such. The sim is going to fight things regardless but it doesnt matter as long as the visual effect is not interrupted. As for the framerate loss, thats only when you start doing some extremely crazy stuff....This is only for transfering the results of a calculation to the animation.
 
Back
Top