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.

Smoke Gauge

Featured Replies

Hi!I've a question about a smoke gauge:It must toggle the smoke on or off, depending on the fuel flow. If fuel flow is greater than 0, it should turn the smoke switch on, and otherwise, it should turn it off.When starting the engines, it turns the toggle on. That's ok. But then, if you have also a visible switch, where you can see the value of the (A:Smoke,bool), you see that the switch jumps from 1 to 0 and back, many times in one second. Why doesn't it just keep in 1 position???Then, when turning off the engines, the toggle sometimes keeps in 0, sometimes in 1 position. So, the smoke isn't always turned off. Why this???Regards,Harry :-) (A:ENG1 FUEL FLOW PPH,pounds per hour) 1 < (A:SMOKE,bool) 1 == && if{ 1 (>K:SMOKE_TOGGLE) } (A:ENG1 FUEL FLOW PPH,pounds per hour) 1 > (A:SMOKE,bool) 0 == && if{ 1 (>K:SMOKE_TOGGLE) }

I haven't tested for xml gauges, but in my experience the effect of any K: event doesn't take immediate effect to the A: variables, it takes time till the next drawing cycle. So if you work with any K:..._TOGGLE event try to use it only once in a gauge (better once in a panel!) or use a corresponding K:..._SET or ..._ON/ ..._OFF event if available.e.g.<Value>(A:ENG1 FUEL FLOW PPH,pounds per hour) 1 > (>K:SMOKE_SET)</Value>or<Value>(A:ENG1 FUEL FLOW PPH,pounds per hour) 1 > if{ 0 (>K:SMOKE_ON) } els{ 0 (>K:SMOKE_OFF) }</Value>Arne BartelsKEY_SMOKE_ON

Well, the gauge now works. (Source Code below!!!).But what I don't understand is why it doesn't work with a normal toggle!? If the FF is 0, then it just should switch the value from 1 to 0, and that's it. Not more. Why is it switching the whole time(with the old code), even if the I've told the FS2002 that it just should execute the K:Smoke if the last 2 values are true??? I've to make 4 gauges in this style(for JS Design), which should control an effect file. (NAV, Strobe, Smoke,.....)But not every FX has an ON/OFF toggle K Event! So, what should I do with TOGGLE_BEACON_LIGHTS for example? How can I tell the FS that it should just toggle to 1 with this variable??? (>K:TOGGLE_BEACON_LIGHTS)-->How to tell FS to switch to 1??? (>K:TOGGLE_BEACON_LIGHTS 1)-->won't work I think!!!Regards,Harri :-) (A:ENG1 FUEL FLOW PPH,pounds per hour) 0== if{ 1 (>K:SMOKE_ON) } els{ 0 (>K:SMOKE_OFF) }

In that case I'd try to use only one toggle in one gauge in the panel. Something like- check the condition- compare with the state of the A: variable- if it should be different, toggleArne Bartels

So, that means that I should make the same as in the first gauge, which didn't really work. Just that the OFF/ON part must be in 2 seperat gauges , and not everything in 1!? Well, I'll try this!Harry :-)

You can use ..._SET, ..._ON, .._OFF events in more then one gauge, because of the deterministic result, the associated A: variables aren't sensible to "race conditions". The .._TOGGLE events however should be used with great care and only in one gauge per panel for those "automatic" stuff.A bit like your first proposal:<Gauge Name="Smoke Switch" Version="1.0"> <Element> <Select> <Value> (A:ENG1 FUEL FLOW PPH,pounds per hour) 1 < (* assume FF is low *) (A:SMOKE ENABLE,bool) (* smoke is on *) == (* both conditions the same*) if{ 0 (>K:SMOKE_TOGGLE) } (*then you have to toggle *) (* FF high, smoke off => both conditions false => equal => toggle *) (* FF high, smoke on => cond1 false, cond2 true => not equal => no toggle*) (* FF low, smoke off => cond1 true, cond2 false => not equal => no toggle*) </Value> </Select> </Element></Gauge>Arne Bartels

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.