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.

Two actions, one button, with delay

Featured Replies

Hello

 

I am a complete novice when it comes to AAOs, and my computer skills are at a Troglodyte level. But I have the TM Airbus TCA throttle quadrant, and I want to have two actions mapped to one button, but with a delay.

 

I.e. I am flying the ini A340 and I want engine start lever 1 to start both Engine 1 and 2, but to start engine 2 with a few second delay.

 

What is the best way to go about doing that? And once I have figured that out, I would then do the same for engine 3 and 4

  • Commercial Member
6 hours ago, Vatnsfjord said:

Hello

 

I am a complete novice when it comes to AAOs, and my computer skills are at a Troglodyte level. But I have the TM Airbus TCA throttle quadrant, and I want to have two actions mapped to one button, but with a delay.

 

I.e. I am flying the ini A340 and I want engine start lever 1 to start both Engine 1 and 2, but to start engine 2 with a few second delay.

 

What is the best way to go about doing that? And once I have figured that out, I would then do the same for engine 3 and 4

For that you would be using RPN scripts.  

First, it is necessary to figure out how exactly these switches are operated under the hood. In this case the developer used InputEvent. Unfortunately, the IE will always operate the switch when actuated (normally one would expect ON and OFF to be separate options, instead in this aircraft we only get a toggle). So I had to dig deeper and figure out how to know if the switch is currently up or down, and integrate that information in the script as well.

Engines On in 3 second intervals:

(L:INI_MIXTURE_RATIO1_HANDLE, Number) 0 == if{ 1 (>IE:AIRLINER_ENG1_CUTOFF) } (WAIT:3000) 
(L:INI_MIXTURE_RATIO2_HANDLE, Number) 0 == if{ 1 (>IE:AIRLINER_ENG2_CUTOFF) } (WAIT:3000) 
(L:INI_MIXTURE_RATIO3_HANDLE, Number) 0 == if{ 1 (>IE:AIRLINER_ENG3_CUTOFF) } (WAIT:3000) 
(L:INI_MIXTURE_RATIO4_HANDLE, Number) 0 == if{ 1 (>IE:AIRLINER_ENG4_CUTOFF) } (WAIT:3000)

Engines Off in 3 second intervals

(L:INI_MIXTURE_RATIO1_HANDLE, Number) 1 == if{ 1 (>IE:AIRLINER_ENG1_CUTOFF) } (WAIT:3000) 
(L:INI_MIXTURE_RATIO2_HANDLE, Number) 1 == if{ 1 (>IE:AIRLINER_ENG2_CUTOFF) } (WAIT:3000) 
(L:INI_MIXTURE_RATIO3_HANDLE, Number) 1 == if{ 1 (>IE:AIRLINER_ENG3_CUTOFF) } (WAIT:3000) 
(L:INI_MIXTURE_RATIO4_HANDLE, Number) 1 == if{ 1 (>IE:AIRLINER_ENG4_CUTOFF) } (WAIT:3000)

 

Edited by Lorby_SI

LORBY-SI

  • Author
19 minutes ago, Lorby_SI said:

For that you would be using RPN scripts.  

First, it is necessary to figure out how exactly these switches are operated under the hood. In this case the developer used InputEvent. Unfortunately, the IE will always operate the switch when actuated (normally one would expect ON and OFF to be separate options, instead in this aircraft we only get a toggle). So I had to dig deeper and figure out how to know if the switch is currently up or down, and integrate that information in the script as well.

Engines On in 3 second intervals:

(L:INI_MIXTURE_RATIO1_HANDLE, Number) 0 == if{ 1 (>IE:AIRLINER_ENG1_CUTOFF) } (WAIT:3000) 
(L:INI_MIXTURE_RATIO2_HANDLE, Number) 0 == if{ 1 (>IE:AIRLINER_ENG2_CUTOFF) } (WAIT:3000) 
(L:INI_MIXTURE_RATIO3_HANDLE, Number) 0 == if{ 1 (>IE:AIRLINER_ENG3_CUTOFF) } (WAIT:3000) 
(L:INI_MIXTURE_RATIO4_HANDLE, Number) 0 == if{ 1 (>IE:AIRLINER_ENG4_CUTOFF) } (WAIT:3000)

Engines Off in 3 second intervals

(L:INI_MIXTURE_RATIO1_HANDLE, Number) 1 == if{ 1 (>IE:AIRLINER_ENG1_CUTOFF) } (WAIT:3000) 
(L:INI_MIXTURE_RATIO2_HANDLE, Number) 1 == if{ 1 (>IE:AIRLINER_ENG2_CUTOFF) } (WAIT:3000) 
(L:INI_MIXTURE_RATIO3_HANDLE, Number) 1 == if{ 1 (>IE:AIRLINER_ENG3_CUTOFF) } (WAIT:3000) 
(L:INI_MIXTURE_RATIO4_HANDLE, Number) 1 == if{ 1 (>IE:AIRLINER_ENG4_CUTOFF) } (WAIT:3000)

 

Brilliant! Thank you so so much! Just one little extra question. Where would I put these RPN scripts?

 

Sorry for asking such simple and silly questions!

  • Author
1 hour ago, Lorby_SI said:

AxisAndOhs manual, chapter about "Scripting" 

😉

Thank you!

 

I actually found it in the end, and used the Script editor in the app, and I have managed to get it to work to turn on the engines with delay - much appreciated the help!

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.