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.

Active Com1 frequency

Featured Replies

Is there a way to use linda or lua to constantly monitor the active Com1 frequency and write it to a simple text file.  The file would simply get overwritten when a new active com1 frequency is selected?

 

Thanks

Brian

Hi Brian

There is but what do you intend to do with the file data? There may be a more efficient way of passing through data to another process. 

Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

  • Author

I'm an old school visual foxpro programmer.  When the com freq is changed, my VFP app needs to read it and then continue processing.  I wrote a VB app a while back that would grab FS data to a text file for VFP to process it, but I lost the source code.   

 

Actually, remembering back, I think my VB app would put FS data into the keyboard buffer and my VFP app would read the buffer and continue processing   

 

Im not that good of a VB programmer to do all of it, hence the passing to VFP

 

I tried using fsuipc to log the com changes but the log file only gets updated when fsuipc is closed.  

Leave it with me for a few days.

Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

  • Author

awesome...thanks!

Hi Brian

This should do what you wanted. Copy code into: \linda\libs\lib-user.lua or \linda\aircrafts\{your aircraft}\user.lua.

function myCOM1(val)
    local strFreq = strFreq(getCOMFrequency(1, false))
    _loggg('[LIBU] Com1=' .. strFreq)
    file = io.open ("vps.txt", "w+")
    io.output(file)
    io.write(strFreq)
    io.close(file)
end

event.offset(0x034E, "UW", "myCOM1")

It runs only when the COM1 is changed and writes the string to file vps.txt. You can change the filename to suit your needs. If you place the code into lib-user.lua then it will work will all your aircraft whereas the user.lua is for the specific aircraft.

Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

  • Author

Awesome.  Thank you for this!

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.