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.

Switch works in Reverse!

Featured Replies

Below is some code for the sound of aircon.The switch positions are down(off) and up(on)When I click to turn the switch on(up) there is no aircon sound. When I subsequently click the switch off(down)the aircon sound is initiated until I then click the switch on(up). Consequently the switchis operating in reverse order.Could someonw have a look at the code and suggest a correction.Many thanks.vololiberista

<Gauge Name="Aircon switch" Version="1.0">   <Element>      <Select> <Value>(G:Var1)</Value>                <Case Value="0">            <Image Name="OH_SWITCH_2_OFF.bmp" ImageSizes="33,58"/>         </Case>         <Case Value="1">            <Image Name="OH_SWITCH_2_ON.bmp" ImageSizes="33,58"/>         </Case>      </Select>   </Element>   <Mouse>         <Tooltip>Aircon Switch</Tooltip>      <Cursor Type="Hand"/><Click>(G:Var1) 0 != if{ 0 (>G:Var1) 1 (>L:Sound_button,enum) 2 (>L:Sound_aircon,enum) } els{ 1 (>G:Var1) 1 (>L:Sound_button,enum) 0 (>L:Sound_aircon,enum) }</Click>   </Mouse></Gauge>

3VlzBGn.jpg?1

Super VC10 into LOWI with PF3 at a cinema near you

https://www.youtube.com/watch?v=298UDyNmgUA

 

Hi,Not tested, try:<Click>(G:Var1) 0 == if{ 1 (>G:Var1) 2 (>L:Sound_aircon,enum) } els{ 0 (>G:Var1) 0 (>L:Sound_aircon,enum) } 1 (>L:Sound_button,enum) </Click> Jan

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Moderator

...or, simply swap the on and off image assignments... :(

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Hi,But then, I think, the switch will always be on at startup and the airco sound off, unless you add an init in where the sound is set to 2.Again, not tested.Jan

Jan

 

 

 

"Beatus ille qui procul negotiis..."

  • Moderator
But n4gix yours had no effect :-(thanks to both.vololiberista
Like Jan, I too have a name: Bill. That's why I sign my posts... :)Funny that it didn't work:
         <Case Value="0">             <Image Name="OH_SWITCH_2_ON.bmp" ImageSizes="33,58"/>          </Case>          <Case Value="1">             <Image Name="OH_SWITCH_2_OFF.bmp" ImageSizes="33,58"/>          </Case>

This should have simply synchronized your switch image with the sound file... :(

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author

Thanks to "Jan" and "Bill" :-)Just swapping the switch assignments with the code as it was didn't work. Even though one would expect it to do so!!!!The only annomaly now is that the sound momentarily stops/pauses when I select other panels from within the main panel. The dsd_xml_sound3 ini file is on the main panel window00 but the switch is located on the overhead. Whenever I select any panel such as ohd, radio, etc (whilst still having the main visible) after switching on the sound, the sound as previously stated montarily pauses. Is this an anomaly related to xml? Or can it be cured?vololiberista

3VlzBGn.jpg?1

Super VC10 into LOWI with PF3 at a cinema near you

https://www.youtube.com/watch?v=298UDyNmgUA

 

Another tip, although not relevant wrt. to your question:If you use variables that should retain their value overtime (like you use G:Var1 now), in general try to avoid using G:Vars but use your own defined L:Vars instead.Because under some circumstances (like reloading a panel in FS9 after editting a gauge, or changing from FullScreenMode to WindowedMode v.v.) G:Vars are reset to 0.Which usually isn't what you want/expect :( Cheers, Rob

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.