May 14, 200521 yr As part of my ongoing project to create an HT9100 interface for FS I have a new requirement. Id the sim is paused we need to modify the fuel flow data being transmitted tot he HT9100. I've found key events that allow me to programmatically toggle the pause state of the sim but I can't find a token or named variable that allows me to programmatically determine if the sim is paused. Anyone know what piece of data will tell me if the sim is paused?Thank you.
May 14, 200521 yr Your best bet will be to track a variable likeCLOCK_TOTAL_SECONDS or ELAPSED_SECONDS.If the value has not changed since the last reading, then the sim is most likely paused... I say 'most likely' because I believe placing the sim in slew mode will also stop these variables from incrementing.Doug
May 14, 200521 yr Hi,You could use a L:Var (if there are no objections)%((L:pause,bool) !)%{if}-----%{else}PAUSE%{end}(L:pause,bool) ! if{ 1 (>L:pause,bool) (>K:PAUSE_ON) } els{ 0 (>L:pause,bool) (>K:PAUSE_OFF) } Hope it helps,Jan"Beatus Ille Procul Negotiis" Jan "Beatus ille qui procul negotiis..."
May 15, 200521 yr ELAPSED_SECONDS is good for fuel consumption calcs, because both in slew or pause this var stops to increase and also no fuel is used, so everything is fine.Arne Bartels
May 16, 200521 yr Is this variable also available in XML ??It tried every variant I can think of, like:A:ELAPSED SECONDS,secondsP:ELAPSED SECONDS,secondsE:ELAPSED SECONDS,secondsA:ELAPSED_SECONDS,secondsP:ELAPSED_SECONDS,secondsE:ELAPSED_SECONDS,secondsbut nothing works.Rob
May 16, 200521 yr http://forums.avsim.net/dcboard.php?az=sho...14662&mode=fullRegards,Roman FS RTWR SHRS F-111 JoinFS Little Navmap
May 16, 200521 yr >http://forums.avsim.net/dcboard.php?az=sho...14662&mode=full>>>Regards,>Roman>Yes, that piece of code is no news to me :-).But my question was about the "ELAPSED SECONDS" variable, as mentioned by Arne.Because (P:Absolute time,seconds) IS stopped during Pause, but NOT stopped during Slew.And I'm looking for a variable (in XML) that indicates that the sim is not running normally, being either in Menu mode, in Pause or in Slew. Or simply said: determine if the sim is in Slew mode, because detection of all other "suspend" modes are clear to me.Regards, Rob
May 17, 200521 yr From SDK - May be P: or E: type booleanIS SLEW ACTIVEIS SLEW ALLOWEDRegards,Roman FS RTWR SHRS F-111 JoinFS Little Navmap
May 17, 200521 yr Hi Roman,Thanks for the tip. I overlooked that one in the FS2004 SDK.(A:IS SLEW ACTIVE,bool) works fine, so combined with ABSOLUTE TIME it solves my problem of how-to suspend fuel calculations when FS is not running normally.Still curious after the ELAPSED_SECONDS in XML though :-)Regards, Rob
May 17, 200521 yr Rob,While there is no Elapsed Time variable you could make your own.(G:Var1) 0 == if{ (P:ABSOLUTE TIME, seconds) (>L:TIMERSTART, enum) 1 (>G:Var1) }(P:ABSOLUTE TIME, seconds) (L:TIMERSTART, enum) - (>L:ELAPSEDTIME, enum) Regards,Roman FS RTWR SHRS F-111 JoinFS Little Navmap
May 18, 200521 yr Author This is how I do it... (P:Absolute time, seconds) (G:Var1) == if{ 1 (>L:paused,bool) } els{ (>L:paused,bool) } (P:Absolute time, seconds) (>G:Var1)...then I just check for (L:Paused,bool) being true as necessary.
Create an account or sign in to comment