Sign in to follow this  
Guest JeanLuc_

TokenVars for Pause / Slew?

Recommended Posts

Are there TokenVars to check pause / slew state (in C of course, no XML)? Just can't find 'em... :-rollThanks,Etienne :-wave

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

There aren't any. Personally I log ELAPSED_SECONDS and check if they have changed from last iteration. If no we have pause (not too shure about slew).Arne Bartels

Share this post


Link to post
Share on other sites

Ahh yeah I see. Well the prob with slew will be that time keeps running. And TICK18 is totally useless since it overrides everything, pause, slew, and time compression.Thanks.Etienne :-wave

Share this post


Link to post
Share on other sites

Hi Etienne,there are two possibilities:1.) Use the FSUIPC interface to retreive this value2.) Read the memory of the flightsimulator (you need the offset of that variable which is set in sim1.dll and stored in global.dll - just debug a bit, you will find it)Regards,Marcel

Share this post


Link to post
Share on other sites

>1.) Use the FSUIPC interface to retreive this value If you tell me how to...>2.) Read the memory of the flightsimulator (you need the >offset of that variable which is set in sim1.dll and stored >in global.dll - just debug a bit, you will find it) If you tell me how to...Hehe you're funny :-) but I ain't a pro!!Thanks anyway, maybe one day I am able to do this (lol)!Etienne :-wave

Share this post


Link to post
Share on other sites

I dug this out from flightsim.com forum:...#include "FSUIPC_User.h"...DWORD dwResult=0;...#define CENTRE_LEVEL 0x0B74...BOOL FSAPI FuelDump(PPIXPOINT arg1, FLAGS32 mouse_flags ){ DWORD fuellevel=66536*128;//100% fuellevel = (int)((double)fuellevel*0.5);//50% FSUIPC_Open(SIM_FS2K2 , &dwResult); FSUIPC_Write(CENTRE_LEVEL, 4, &fuellevel, &dwResult);... FSUIPC_Process(&dwResult); FSUIPC_Close(); return FALSE;}This was a "fueldump" gauge. You have to link these libraries:user32.lib FSUIPC_User.lib kernel32.lib msvcrt.lib It won't compile in BCC, because the lib format isn't compatible, but VC andGCC work.So with FSUIPC_Read and proper offsets it might work. There are some other possibilities desribed in the FSUIPC SDK.Arne Bartels

Share this post


Link to post
Share on other sites

Hmmm if it does not compile with BCC that's bad... :-hmmmThanks for the research anyway. Does FSUIPC generally not work with BCC?Etienne :-wave

Share this post


Link to post
Share on other sites

My problem was, that the FSUIPC_User.lib isn't BCC compatible (BCC uses a different file format then VC or GCC). There are tools to convert this, but the result was also not working.I saw a possibility by recompiling one of the samples of the FSUIPC SDK to generate a new BCC compatible FSUIPC_User.lib, but I didn't check that in detail, because I didn't need it, having other compiler possibilities.So I wouldn't say there are general problems with BCC and FSUIPC, it just doesn't work "out of the box".Arne Bartels

Share this post


Link to post
Share on other sites

Ahh ok, thanks. Maybe when I get some time I gotta start fiddling around a bit with this stuff.Etienne :-wave

Share this post


Link to post
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
Sign in to follow this