Jump to content
The simFlight Network Forums

Offset Ready to fly for new MSFS


MDFR

Recommended Posts

Hello fellows.

 

I created a simple windows application in 2010, so the app is almost 12 years old and I used the following offset to get when the sim is in "Ready To Fly" mode 

Private SimIsReadyToFly As Offset(Of Integer) = New Offset(Of Integer)("SIMSTATUS", &H3364)

 

and used the following function

 

Public Function ReadSimIsReadyToFly() As Boolean
        Try
            FSUIPCConnection.Process("SIMSTATUS")
            If SimIsReadyToFly.Value = 0 Then
                Return True
            Else
                Return False
            End If
        Catch ex As FSUIPCException
            Fsuipc_exception_handler(ex)
            Return False
        End Try
        Return False
    End Function

 

This do not work anymore with new MSFS

Can anyone here help me whit this ?, because I nedd that my app start logging only when sim is ready.

 

Thanks in advance !

 

 

 

 

Edited by MDFR
Link to comment
Share on other sites

HI,

Looking at the offset list, 3364 is only 1 byte. You've declared it as 4 bytes (Integer). You'll also be reading the data from the next 3 offsets which may be messing things up.

Declare this offset as 1 byte (Byte):

Private SimIsReadyToFly As Offset(Of Byte) = New Offset(Of Byte)("SIMSTATUS", &H3364)

 

MSFS works differently than previous Microsoft sims and P3D. You may also need to check the next offset 3365 - "In Menu" to make sure that is also 0:

Private SimIsInMenu As Offset(Of Byte) = New Offset(Of Byte)("SIMSTATUS", &H3365)

 

From reading other threads about "Ready to Fly" in MSFS, you might also have to check the Pause flag to be 0. MSFS sets this at some point when loading the flight. If might not be necessary (I can't test it here) but just in case:

Private SimIsPaused As Offset(Of Short) = New Offset(Of Short)("SIMSTATUS", &H264)

 

You'll need to experiment with these offsets. Maybe monitor them as MSFS is loading the flight to get an idea of how they change and what the values are when you need to start your logging app.

Paul

Link to comment
Share on other sites

Adding to what Paul has said, MSFS sends various pause/unpause events while starting-up and I think the ready-to-fly flag also changes during start-up, but this behavior has changed over the various updates and am not sure of the status of this offset at the moment, I will check it when I get a chance,
However, a useful offset for MSFS in 0x062B (PLANE IN PARKING STATE). This contains 1 when in the main MSFS menu system, and 0 otherwise, and so can be used as an indicator if a plane is loaded or not, regardless if the pause state.

John

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.