Jump to content
The simFlight Network Forums

Fuel capacity readout problems


Recommended Posts

Hi Pete,

trying to read out some fuel capacity values from FS9 using FSUIPC, I've encountered some problems. While reading the capacity from FS 2002 works without a problem, my application and FS Interrogate show "0" at the relevant offsets (e.g. 0B78, 0B7C...) in FS9 although the SDK docs show that it should be compatible. I've tried several versions of FSUIPC, any idea what is going wrong here?

Thanks in advance!

Link to comment
Share on other sites

trying to read out some fuel capacity values from FS9 using FSUIPC, I've encountered some problems. While reading the capacity from FS 2002 works without a problem, my application and FS Interrogate show "0" at the relevant offsets (e.g. 0B78, 0B7C...) in FS9 although the SDK docs show that it should be compatible. I've tried several versions of FSUIPC, any idea what is going wrong here?

The offsets, values and methods are the same for FS2000, FS2002 and FS2004 (probably also CFS2 as well).

Please use FSInterrogate to check the values you should be expecting.

Please use FSUIPC's IPC read logging to check that you are, in fact, reading the right things. If you don't understand what is going on by all means show me the log extracts, but first, please do use the tools provided.

I assume you have registered your copy of FSUIPC? Otherwise your application may not be getting access, and in that case you will get zeroes for most everything. Again, the Log will show you what is going on That is what it is for. You can also verify this by running version 3 of FSUIPC on FS2002 or FS2000 -- I assume you were using version 2 before?

Finally, please do not "try several versions of FSUIPC". Only the current one (3.30 at present) is supported. I don't want to see any reports from old versions, please.

Regards,

Pete

Link to comment
Share on other sites

Please use FSInterrogate to check the values you should be expecting.

As stated above, I'd already tried FSInterrogate with the same results.

Finally, please do not "try several versions of FSUIPC". Only the current one (3.30 at present) is supported. I don't want to see any reports from old versions, please.

Well, actually I did also test it with 3.30, however, I mentioned it in order to show that this presumably wasn't a bug introduced with the newest version :wink:.

However, I probably figured out the cause of this problem eventually. Obviously, FS9 does only init these values after you have started a flight, i.e. they are initially set to "0" whilst in the main menu for the first time (had always checked out the values while being in the menu till now). In FS 2002, they were already set after selecting the aircraft in the menu interface (as far as I know/have tested), so I guess that's the cause and probably there's nothing you could do about.

Thanks for your efforts anyway, Pete! Keep up the great work!

Link to comment
Share on other sites

As stated above, I'd already tried FSInterrogate with the same results.

Oh, terribly sorry -- must've read it too fast. :oops:

However, I probably figured out the cause of this problem eventually. Obviously, FS9 does only init these values after you have started a flight, i.e. they are initially set to "0" whilst in the main menu for the first time

Actually, it probably isn't FS9. Most of FSUIPC doesn't start until you've started a flight, at least in FS9. This is because there are many SIM1.DLL data sections which are not set up until then and attempting to access them would create an access violation crash.

FS2000 and FS2002 aren't quite so drastic -- in FS2000 the SIM1 data areas were mostly in its own data memory (i.e. in predefined areas), so there was no danger of crashing. In FS2002 the areas are created on the heap, but they are all part of one large structure and all created at once.

In FS2004 this has all been split into different structures for different subsystems and only a subset of those actually exist depending upon aircraft type, engine type, number of engines, and so on. It is very complicated and, although some stuff may be available earlier, I dare not take the risk, nor wreck performance by making lots of extra pre-checks just in case.

The same can apply when you are in other menus or dialogues -- FSUIPC detects this and deliberately stops accessing most of the data -- of course, by then some values will have been set, if they are copied into global or FSUIPC memory (not all are -- if no conversions are needed the mapping works directly to the original data). Before the start none are set either way, hence the zeroes.

Regards

Pete

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.