Jump to content
Sign in to follow this  
STF-DIR

React at Mode Knob

Recommended Posts

function PS_Radios_NAV_AUDIO_toggle ()
  if "Display Shows NAV1" then
	DspShow("NAV1","AUD")
  end
  if "Display Shows NAV2" then
	DspShow("NAV2","AUD")
  end
end

Hello,

 

in the MCP1 on the right side are this Mode Knob.

Pressing this will, as Default FSX function, toogle COM1/COM2 , NAV1/NAV2 , ADF1/ADF2, DME1/DME2 and Markers Audio.

Hope you know which button i mean?

 

Ok, now i want to write my own function to react on this button.

But in this function i must be able to know if COM1 or COM2 , NAV1 or NAV2 ... is selected.

The function must do something if NAV1 is selected and something else if NAV2 is selected.

 

My question is how i can decide what is selected in my own function?

 

 

 

Thanks

Matthias


i9-9900KF CPU @ 3.60GHz, 32GB Ram,RTX 3090TI,MSFS

Share this post


Link to post
Share on other sites

Uh I think I can't help you.

 

As far as I know, this button is "hardcoded". You can assign something additionally, but the primary function couldn't be changed.

I could be wrong, but as far as I know that's it ...

 

I can't see a possibility to readout if COM1 or COM2 etc is activated ...

 

 

 

Only solution maybe:

you activate a global variable with your lua script.

So, if the script starts, this variable is set to "1".

With every change the variable changes also ...

Maybe this works


Guenter Steiner
--------------------------------------------------------------------------------------

Betatester for: A2A, LORBY, FSR-Pillow Tester
--------------------------------------------------------------------------------------

Share this post


Link to post
Share on other sites

Hello,

 

thanks.

 

But i found some variable who defines what is slected.

Then you can check what is selected and react on this.

 

com_open == 1

com_open == 2

nav_open == 1

nav_open == 2

adf_sel == 1

adf_sel == 2

 

These are global coded.

 

The only i did not found is the Transponder.

 

Matthias


i9-9900KF CPU @ 3.60GHz, 32GB Ram,RTX 3090TI,MSFS

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...