Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi Pete.

Which is the correct way of testing if FSX has loaded a flight?

I explain myself.

When my program loads, it creates a menu and submenu in the add-on menu, but this can only be done if fsx is in a flight (I mean, not in the opening screen where you select aircraft, location, weather, etc)

The way I sorted is :

When in opening screen all variables recived from FSUIPC are 0, so what I'm actually doing is

If altitude = 0 and Aircraft on ground = 0 --> offset 0366 (0=airborne, 1=on ground) then

' this situation means I'm at 0 ft and flying, because that is not posible, means I'm in Opening screen

end if

As you can see, I sorted, but will like to know if you have a better way to solve it.

Thanks.

Regards

Javier

Posted

The way I sorted is :

When in opening screen all variables recived from FSUIPC are 0

That's probably only true for some values because your requests can't be serviced because FSUIPC isn't getting the access yet. If you moved to FSX that certainly wouldn't be the case.

... but will like to know if you have a better way to solve it.

The proper way, used by my accessories for instance, is the 3364 offset, "ready to fly". 3365 is related. You should read them together as a 16bit word and assume "ready to fly" when both are zero. They will be non-zero as soon as you can read anything.

Regards

Pete

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.