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.

Jet Engine Starter(s) in FSX - C Gauges

Featured Replies

  • Moderator

Well, this just sucks... I figured out how to "make it work," but it means I have to have two different versions of the gauge, because the FSX start routine won't work in FS9, and vice-versa! :(Here is an example of what "works" in FS9:////////////////////////////////////////////if ( TURB_ENGINE_1_CORRECTED_N2var.var_value.n < 23 && starter_left == 1 && MASTER_BATTERYvar.var_value.n == 1 ) { trigger_key_event (KEY_TOGGLE_STARTER1,0) ; } else { starter_left = 0 ; }//////////////////////////////////////////// Here is what "works" in FSX: if ( TURB_ENGINE_1_CORRECTED_N2var.var_value.n < 23 && starter_left == 1 // 'lights' the starter button&& startlatch1 == 0 // make sure the toggle_starter only gets done once&& MASTER_BATTERYvar.var_value.n == 1 // make sure we have power!) { trigger_key_event (KEY_TOGGLE_STARTER1,0) ; startlatch1 = 1 ; } else if ( TURB_ENGINE_1_CORRECTED_N2var.var_value.n > 23 && startlatch1 == 1 ) { trigger_key_event (KEY_TOGGLE_STARTER1,0) ; starter_left = 0 ; startlatch1 = 0 ; }

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Well, not knowing how much trouble this will be...You could always attempt a SimConnect "connection"If it succeeds, you are in FSX, and will use the FSX block. If it fails, you are in FS9...At least you can keep all that in one gauge.DougEdit: There should be some way to query the version number of the executable as well. Probably easier this way.dsd

If you are in FS9, no harm in setting an additional var.Patrick

  • Author
  • Moderator

>If you are in FS9, no harm in setting an additional var.>>PatrickAh, Patrick... the "FSX version" of the code won't work at all except with FSX......because, the key_event KEY_TOGGLE_STARTERx has been "broken" since it was first introduced! The "toggle" part didn't, "toggle" that is.Now that ACES has "fixed it," all code written to use it now has to be modified. :)Pre-FSX the command worked like a single-shot event and required 'repeated triggering' to keep it active. Hence the need for the conditions to keep the "button pushed" until engine start. Parenthetically, that's also why one had to constantly 'click' on the switch in the some of the default FS2k2/FS9 aircraft to keep the starter active.Now that it is "fixed," the event works like a physical, latched switch. The "pre-FSX trick" is now effectively self-cancelling, meaning that the engine(s) will NEVER even spool up.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
  • Moderator

>Well, not knowing how much trouble this will be...>You could always attempt a SimConnect "connection">If it succeeds, you are in FSX, and will use the FSX block. >If it fails, you are in FS9...>At least you can keep all that in one gauge.>>Doug>>Edit: There should be some way to query the version number of>the executable as well. Probably easier this way.Oh, there's any number of ways this can be addressed, true enough... My main point is that this is one of the few cases where ACES probably shouldn't have "fixed" something... ;)One could also check for a 5th parameter in the gauge entry in the panel.cfg file, or query a custom .ini file, or maybe even query the aircraft.cfg file.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

I wonder how many other things the have modified in fs-x for c programming gauges. Maybe they have updated the show and hide features.

  • Author
  • Moderator

>I wonder how many other things the have modified in fs-x for>c programming gauges. Maybe they have updated the show and>hide features.I haven't seen the new gauges.h file yet, but there ARE a lot of "new variables" and "key_events" that have to be explored... ;)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

> I haven't seen the new gauges.h file yet, but there ARE a lot of "new variables" and "key_events" that have to be explored... ;)New variables and keyevents....that is a major improvement,some would say there are way to much but "the more the better" is my opinion.Hey bill is the Jet Engine Starter the only gauge structured like thisor is it now all of them.:-hmmm

  • Author
  • Moderator

>Hey bill is the Jet Engine Starter the only gauge structured>like this or is it now all of them.:-hmmmLet's simply say it's the only one I've found... so far... ;)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

You do have a good point. ;).

>I haven't seen the new gauges.h file yet,I have :)Look inFlight Simulator XSDKSimObject Creation KitPanels and Gauges SDKincand you will find (Beta 3 that is) it.

  • Author
  • Moderator

>>I haven't seen the new gauges.h file yet,>>I have :)>Look in>Flight Simulator XSDKSimObject Creation KitPanels and>Gauges SDKinc>and you will find (Beta 3 that is) it.Sorry... that is the FS2004 gauges.h file...Look closely and you'll see that there are 20+ new variables missing, along with the new key_events.The following for example are listed in the Token Variables.html but are still missing from the gauges.h file.ALTERNATE_STATIC_AIR_OPEN Float Alternate static air sourceAILERON_TRIM_PCT Float percent -1 to 1RUDDER_TRIM_PCT Float percent -1 to 1CIRCUIT_LIGHT_NAV_ON Bool True = onCIRCUIT_LIGHT_BEACON_ON Bool True = onCIRCUIT_LIGHT_LANDING_ON Bool True = onCIRCUIT_LIGHT_TAXI_ON Bool True = onCIRCUIT_LIGHT_STROBE_ON Bool True = onCIRCUIT_LIGHT_PANEL_ON Bool True = onCIRCUIT_LIGHT_RECOGNITION_ON Bool True = onCIRCUIT_LIGHT_WING_ON Bool True = onCIRCUIT_LIGHT_LOGO_ON Bool True = onCIRCUIT_LIGHT_CABIN_ONOTOH, I have this sick, sinking feeling that a LOT of the "new stuff" will only be accessible to XML or SimConnect, and will be left out of the gauges.h completely.It's as though ACES really wish us "C guys" would just hurry up and die... :-hang

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

>It's as though ACES really wish us "C guys" would just hurry>up and die...I would certainly hope that isn't true, but #### it, if it is, it would be nice if they would just come out and say so... I'm sure we could all be convinced to find something else to do with our time!Doug Dawson

  • Author
  • Moderator

>>It's as though ACES really wish us "C guys" would just>hurry>>up and die...>>I would certainly hope that isn't true, but #### it, if it is,>it would be nice if they would just come out and say so... >I'm sure we could all be convinced to find something else to>do with our time!Well, I did say that somewhat "tongue-in-cheek," but I have been getting a bit frustrated with the seeming lack of concern being shown...OK, let's say that they don't update the gauges.h with the new stuff... It's fairly trivial - and in many ways easier! - to fetch the XML vars with execute_calculator_code......but, what's the trick for using the XML key_events? :-hmmm ...perhaps (not tested yet):execute_calculator_code("(K:KEY_REPAIR_AND_REFUEL)",NULL,NULL,NULL);

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Commercial Member

Bill, Are you sure the engine starter routines in Beta3 are final? I'm sure Mike.Z said that the work they had done to resolve these differences between the two versions missed B3 and that it would be included in the final build...

Andrew Wilson

sig_fslDeveloper.jpg

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.