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.

Help with XML Clock Creation Help

Featured Replies

First of all, let me say that I am brand spankin' new to AvSim, Gauge creation for FSX, and XML as a whole. That being said, please be patient :)I am trying to program a clock gauge that will show Universal time, and change to display Local time, Flight Time and Elapsed Time. I have made some good progress, but I am stuck on getting the correct time to display based on the G:Var1 variable. Here is my code as it stands:(G:Var1)(G:Var1) 0 ==%((P:Zulu time,hours) flr)%!02d!:%((P:Zulu time,minutes) flr 60 %)%!02d!(G:Var1) 1 ==%((P:Local time,hours) flr)%!02d!:%((P:Local time,minutes) flr 60 %)%!02d!(G:Var1) 3 == if{ (G:Var1) 3 - (>G:Var1) } els{ (G:Var1) ++ (>G:Var1) }As you can see I am using the "Visible" command to choose which text string is visible, the problem is, that it shows the Zulu time when G:Var1 == 0, but it does not show local time when G:Var == 1. It will however show local time if I make that the visible in the 0 case. So what am I missing? Why will it not show the Local time element when G:Var1 == 1?I appreciate any help you can provideThanksCharlie

  • Moderator

Try using (G:Var1,enum) instead of just (G:Var1)...

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Thanks for the quick response. I really appriciate your help.adding enum does not seem to have changed anything in the gauge operation.Zulu time still shows when G:Var is = to 0, but Local time does not become visible when G:Var = 1.Any other ideas?

Actually, I think I just found out what is going on. Here is the deal, and it is a new issue alltogetherIt is making it visible, it is just not redrawing the text string until something in it changes. It only updates the layers that are visible, so since I am only showing Hours and Mins, if I wait for the clock to change the mins digit, then it appears, but If I let it sit there for a couple of mins, and then go back to the Zulu time, it will still be on the numbers it was on when I switched away from it...until the min digit changes while that is visible.Does that make sense?

OK, I think that I got that issue figuresd out. I am sure that there is a better way than the way I did it, but this seems to work. I added a seconds portion to the string, but restricted the number of digits to 5 so that they dont show up. Seems to be working for the time being.Thanks for the helpCharlie

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.