f16jockey Posted March 20, 2015 Report Posted March 20, 2015 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
Pete Dowson Posted March 20, 2015 Report Posted March 20, 2015 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
f16jockey Posted March 21, 2015 Author Report Posted March 21, 2015 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. Thanks, Wim
Pete Dowson Posted March 21, 2015 Report Posted March 21, 2015 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
f16jockey Posted March 21, 2015 Author Report Posted March 21, 2015 Thanks, sure can wait. Still enough work on the global script. Specific ones can wait. Wim
aua668 Posted March 21, 2015 Report Posted March 21, 2015 Pete, This will be a great enhancement. Thanks for implementing this feature. Rgds Reinhard
Pete Dowson Posted March 22, 2015 Report Posted March 22, 2015 If you'd like to wait for the next FSUIPC4 release, possibly next week It's ready earlier than I originally planned, version 4.939g will be released today (Sunday 22nd March). Pete
f16jockey Posted March 24, 2015 Author Report Posted March 24, 2015 Thanks again. Works great. At least after I learned how a null terminated string is handled in LUA :oops: . Wim
ark1320 Posted March 27, 2015 Report Posted March 27, 2015 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.
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