Jump to content
The simFlight Network Forums

Lua script - Active FSUIPC profile ?


Recommended Posts

Hi, still working on the Saitek LED stuff...

 

For some payware it's (for example) not enough to read 0x0810 to know the Autopilot Master status.

One needs to read an Lvar, which (of course) is different for different add-ons.

 

I'm trying to avoid writing X times a (slightly) different script for each add-on.

A more elegant way (IMHO) would be to write a unique script, which decides what Lvar to read, based on the active profile.

Hence my question : is there a way of "reading" what FSUIPC profile is currently active ?

 

Wim

Link to comment
Share on other sites

Hence my question : is there a way of "reading" what FSUIPC profile is currently active ?

 

Not the profile name, at least not at present. You can get the current aircraft title, but not the profile it is assigned to.

 

But if it is useful I could add this, in the next FSUIPC4 update I should think.

 

Pete

Link to comment
Share on other sites

Hmm, I think the aircraft title will do as well.

Guess I'll need to go through the aircraft.cfg files to make them consistent in a way.

 

If you'd like to wait for the next FSUIPC4 release, possibly next week, then I'll have added an offset for the current Profile name (if any). It will be 0x9540 and will be limited to 63 characters plus zero terminator. If the current aircraft is not assigned to a Profile, or Profiles are not being used, then this will be a null string (i.e. just starting with the zero terminator).

 

Pete

Link to comment
Share on other sites

Not the profile name, at least not at present. You can get the current aircraft title, but not the profile it is assigned to.

 

Pete

Pete,

Where is the current aircraft title available to be read by a Lua script?  I can see how access to the aircraft title might be very useful especailly if you have more than one aircraft under a particular Profile.

Thx,

Al

Edit: Ignore above, found it (x3D00). Somehow I never noticed that before. Sorry to have bothered you.

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.