Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Programmatically determine if sim is paused

Featured Replies

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.

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

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..."

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

Thanks guys ELAPSED_SECONDS works perfectly.

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

>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

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

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

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

  • 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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.