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.

XML trim guage help

Featured Replies

Hi folks, Maybe one of you could help me out. I'm trying to add a trim sound effect to a panel using the dsd_xml_sound3 gauge. Here's what I got so far:Gauge directory:dsd_xml_sound3.gauSound dir.:trim_sound.wavtrim_sound.ini ----[Config]MaxSounds=1ErrorFlag=0LvarStop=dsd_stop_sounds[LVars]Lvar00=Trim_Sound[sounds]Sound00=./Sound/trim_sound.wav, 100------On Window00 of my Panel.cfg I have:gauge06=TrimSound!Trimsound, 2,2,1,1gauge07=dsd_xml_sound3!dsd_xml_sound3, 2,2,5,5, ./sound/trim_sound.iniI've created a new directory in my Panel directory with the xml file:TrimSoundTrimsound.xmlNow I'm not sure how to write the logical expression to see whether the trim is being moved or not. From what I'm understanding it would be something like this:If (Trim position is moving) assign 1 to Trim_Sound If (Trim position stops moving) assign 0 to Trim_Sound I'm using the variable "ELEVATOR TRIM POSITION" which returns (obviously) the trim's current position. How can I translate this into "moving" and "not moving"? Is there a better way to do that?Thanks in advance for any help!

  • Moderator

In pseudo-code:elev_trim_pos_old = elevator_trim_position ;elevator_trim_position = ELEVATOR TRIM POSITIONvar.var_value.n ;if (elev_trim_pos_old != elevator_trim_position) { trim_active = true ; }else { trim_active = false ; }

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Hi Bill, thanks for the help. I'm a XML newbie :) and here's the code I came up with. I know there's something wrong with it, could you point me to the right direction? Thanks.(A:ELEVATOR TRIM POSITION, enum) (& gt;G:Var1)(A:ELEVATOR TRIM POSITION, enum) (G:Var1) == ! if { 1 (& gt;L:Trim_Sound, enum) } els { 0 (& gt;L:Trim_Sound, enum) }Mark

Mark,You may want to swap the "loading variable" sequence with the "checker" sequence. Otherwise the sound will never play. Also depending on FS(8/9/X) a value tag may not be allowed inside a solely. IIRC it must reside in a tag.(A:ELEVATOR TRIM POSITION, enum) (G:Var1) == ! if { 1 (& gt;L:Trim_Sound, enum) } els { 0 (& gt;L:Trim_Sound, enum) }(A:ELEVATOR TRIM POSITION, enum) (& gt;G:Var1)RomanProud "TEAM AVSIM" RTW race member.XP Pro, FS9, FR Locked @ 23, AMD 1800+ OCd to 1900+, APIC MProc Mod (24 IRQs), Latency Mods, ECS K7S5a V1.1, 7 fans, 1 gig, 100 & 60 Gig 7200rpm HD, ASUS/NVidia GeForce 64mb AGP on 21", NVidia FX5500 vivo 256mb (CRAP) on 18", Nvidia 93.71s ( The highest can go for the GeForce3 & 5500 combined ), Savage4 32mb on 15", BV services mods.

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

 

  • Moderator

Also, watch the syntax... not== !but rather!=

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Thanks Bill and Roman for the help! It works fine now. Syntax and variable order were to blame. :)

  • Moderator

> Thanks Bill and Roman for the help! It works fine now.>Syntax and variable order were to blame. :) Well, I thought you did a pretty good job of 'translating' my sorta-C-like pseudo-code into XML... ;)The only reason my 'order' would work is because I 'updated' the variable before the comparison...

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author

>Also, watch the syntax... not>>== !>>but rather>>!=Actually produces the same result but with an "extra" step :-)Tom

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.