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.

Configuring FS2020 A320Neo COM Radios with scripted values?

Featured Replies

Hello!

One of the issues that I have with the A320Neo and AAO is that when I change the COM frequency using COM_RADIO_WHOLE_INC and COM_RADIO_WHOLE_DEC (as well as COM_RADIO_FRAC using a AAO Toggle). This increments the SimConnect variables (i can see for example on vPilot) but it doesn’t reflect on the Neo Virtual Cockpit Avionics.

I just discovered (via another tool that captures this) that the COM rotary buttons on the VC actually trigger the COM_STBY_RADIO_SET_HZ event instead.

Also, that the Active/Standby switch button on the VC actually trigger the COM_RADIO_SET_HZ and COM_SBY_RADIO_SET_HZ events in sequence (copying the value via Gauge JavaScript code, I suppose).

This is either poor programming or reinventing the wheel (or both). But it is what it is.

I was wondering if via an RPN script I could emulate either of these mechanisms, hoping that those would indeed reflect on the Neo?

If anybody could provide with some pointers how to get started on either?

Thanks!

Edited by pty1973cm

  • Commercial Member

Hi, 

IMO it doesn't really matter what event they use. The core problem is that the frequencies are not read from the simulator variables. Instead Asobo uses local variables that only "live" in the html instrument.

The way these instruments are made, a mouse click will affect the simulator variable through the events you found - but the simvars (A: COM ACTIVE FREQUENCY:1) etc. are never read back in, so the gauge doesn't "get it", when the value is changed some other way.

Edited by Lorby_SI

LORBY-SI

  • Author
On 11/18/2020 at 6:09 AM, Lorby_SI said:

Hi, 

IMO it doesn't really matter what event they use. The core problem is that the frequencies are not read from the simulator variables. Instead Asobo uses local variables that only "live" in the html instrument.

The way these instruments are made, a mouse click will affect the simulator variable through the events you found - but the simvars (A: COM ACTIVE FREQUENCY:1) etc. are never read back in, so the gauge doesn't "get it", when the value is changed some other way.

Thanks for this, agree this is likely not to work, it is/was just an idea.

Regardless if this is a dead end or not... could you give me a nudge in the right direction on how to try this with RPN scripts? For example:

  • Trying something really simple just for learning, I wanted to set the UNICOM 122.800 absolute value via COM_RADIO_SET_HZ and COM_SBY_RADIO_SET_HZ but failed miserably.

       I tried a number of variations of (122800000,·Frequency·BCD16)·(>K:COM_STBY_RADIO_SET) but I am evidently shooting in the dark.

  • Also, is there a way to create a RPN variable to temporarily hold a value to be written using the SET events above?

Thanks one more time.

 

  • Commercial Member
11 hours ago, pty1973cm said:

Thanks for this, agree this is likely not to work, it is/was just an idea.

Regardless if this is a dead end or not... could you give me a nudge in the right direction on how to try this with RPN scripts? For example:

  • Trying something really simple just for learning, I wanted to set the UNICOM 122.800 absolute value via COM_RADIO_SET_HZ and COM_SBY_RADIO_SET_HZ but failed miserably.

       I tried a number of variations of (122800000,·Frequency·BCD16)·(>K:COM_STBY_RADIO_SET) but I am evidently shooting in the dark.

  • Also, is there a way to create a RPN variable to temporarily hold a value to be written using the SET events above?

Thanks one more time.

 

Hello,

I'm afraid that it is not that simple. The frequency value must be BCD encoded. The correct script for setting 122.8000 is

74368·(>K:COM_STBY_RADIO_SET)

(12280 converted to BCD16 = 74368, you just supply the numerical value before the "(>" assignment).

I do this in code, so I am not sure about how you would calculate an actual value. I think that there are "decimal to BCD" converters online. Also, be mindful that because the value is only 5 digits ,this only works with frequencies in the classic 25KHz spacing. 

You can use local script variables for that last part. These are not the LVARs that live inside the simulator!! AAO L:variables currently only live inside the RPN scripts of the app itself.

74368 (>L:MyOwnVariable)

...

(L:MyOwnVariable) (>K:COM_STBY_RADIO_SET)

Best regards

 

Edited by Lorby_SI

LORBY-SI

Archived

This topic is now archived and is closed to further replies.

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.