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.

Delay in Activating Functions

Featured Replies

I am trying to build an "autostart" switch that is similar to the standard MS autostart (Ctrl E) function. The standard Ctrl E function starts engines 1, 2 ,3 then 4, and that is generally not the sequence in which multi engines are  started. I also want to include other functions such as setting the park brake and some lights etc. 

 

I have set up an XML coded switch that works fine with all appropriate functions happening. The problem is that for all intents and purposes they all happen at once (there may be some delay if used on a slow computer). So I need a delay between each function representing the time taken to move your hand between the appropriate switches and levers, and also to simulate the appropriate time between starting each engine (engine 3 then 4, 2 and 1).

 

I have searched this and other forums and found lots of examples of timers and delays etc but I cannot get any to work as I want them.

 

Instead of using a macro I just placed all function actions in the <Mouse> area. I am assuming I need some coded delay function between each action that can be set at an appropriate length. I have tried (P:Absolute Time,seconds)  then (P:Absolute Time,seconds) 5 + etc. the switch just seems to zoom past the delay.

 

<Mouse>
      <Tooltip>Fast Autostart</Tooltip>
      <Cursor Type="Hand"/>
      <Click>02 (>L:DW_sound_id, number)
(L:DC4AUTOSTART,bool) ! (>L:DC4AUTOSTART,bool)

(A:Brake Parking Indicator,bool) 0 == if{
 (>K:PARKING_BRAKES) }
 

(A:Electrical Master Battery,bool) 0 == if{
(>K:TOGGLE_MASTER_BATTERY) }
 

(A:Master Ignition Switch,bool) 0 == if{
(>K:TOGGLE_MASTER_IGNITION_SWITCH) }
 

(A:Light Beacon,bool) 0 != if{
(>K:TOGGLE_BEACON_LIGHTS) }
 

(>K:STROBES_ON) (>K:STROBES_ON)

(A:General Eng Fuel Valve:3,bool) 0 == if{
(>K:TOGGLE_FUEL_VALVE_ENG3) }
 

(A:GENERAL ENG GENERATOR SWITCH:3,bool) 0 == if{
(>K:TOGGLE_ALTERNATOR3) }......................Continues

 

Thanks for any help?

There could be any number of ways to do this - but having it located in the click will not work with a timer since the click itself is only active during the initial click.. Below is 1 way to make this work. It is not tested, but is validated for schema and follows your original logic.

 

<Gauge Name="DC4 AUTOSTART" Version="1.0">

  <Image Name="Background.bmp"/>

  <!-- This update is the key as it only updates every second, adjustable via the frequency attribute and trigger numbers-->

  <Update Frequency="1">

    (L:DC4AUTOSTART,bool) if{

    (L:DC4_AS_Timer, number) 0 == (A:Brake Parking Indicator,bool) ! and if{ (>K:PARKING_BRAKES) }

    (L:DC4_AS_Timer, number) 5 == (A:Electrical Master Battery,bool) ! and if{ (>K:TOGGLE_MASTER_BATTERY) }

    (L:DC4_AS_Timer, number) 10 == (A:Master Ignition Switch,bool) ! and if{ (>K:TOGGLE_MASTER_IGNITION_SWITCH) }

    (L:DC4_AS_Timer, number) 15 == (A:Light Beacon,bool) and if{ (>K:TOGGLE_BEACON_LIGHTS) }

    (L:DC4_AS_Timer, number) 20 == if{ (>K:STROBES_ON) }

    (L:DC4_AS_Timer, number) 25 == (A:General Eng Fuel Valve:3,bool) ! and if{ (>K:TOGGLE_FUEL_VALVE_ENG3) }

    (L:DC4_AS_Timer, number) 30 == (A:GENERAL ENG GENERATOR SWITCH:3,bool) ! and if{ (>K:TOGGLE_ALTERNATOR3) }

    <!-- AND ON AND ON, CONTINUES -->

    <!-- Increment timer only when autostart active -->
    (L:DC4_AS_Timer, number) ++ (>L:DC4_AS_Timer, number) 

     <!-- Turn off autostart if finished, using a final timer number -->
    (L:DC4_AS_Timer, number) 120 == if{ 0 (>L:DC4AUTOSTART,bool) }


    }

  </Update>


  <Element>
    <!-- Any other element that may or may not be needed -->
  </Element>

  <Element>
    <!-- Any other element that may or may not be needed -->
  </Element>

  <Mouse>

    <Tooltip>Fast Autostart</Tooltip>
    <Cursor Type="Hand"/>

    <Click>
      02 (>L:DW_sound_id, number)
      (L:DC4AUTOSTART,bool) ! (>L:DC4AUTOSTART,bool)
      0 (>L:DC4_AS_Timer, number)
    </Click>

  </Mouse>

</Gauge>

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

 

  • Author

Thanks Spokes

 

Not finished yet but just some fine tuning of times etc. I now have a full autostart procedure for 4 engines including setting of park brake, master battery, mixture, throttles, cowl flaps, props, fuel valves and tank selectors as well as magnetos and starters, that takes about 90 seconds. This is probably faster than the real thing but slower than Microsoft's "autostart", and has the appropriate starting sequence (3,4,2,1). I tried incorporating the primer switches into the sequence but met with some issues regarding the on/off aspect of the primer function, so just left them out (at this stage anyway).

If this is for FS9 I have a more sophisticated solution complete with slow prop rotation.  Not possible in FSX, though - your solution is the best that can be done without SimConnect type programming, AFAIK.

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.