FS2020 sim variables

Support for Arduino in combination with Air Manager and Air Player

Moderators: russ, Ralph

Post Reply
Message
Author
k8jb
Posts: 30
Joined: Mon Jun 07, 2021 5:04 pm

FS2020 sim variables

#1 Post by k8jb »

Got my Logitech switch panel rebuilt with an Arduino micro and it works great within a specific instrument.

Ran into a stumbling block connecting it directly to the sim itself. First problem is simulator variable names - I can find lists online that don't seem to be right - e.g., some variables that I know are settable because I can switch them from my Bravo throttle are shown as not settable. Second are the names themselves - the config list within the sim shows, for example, PITOT HEAT ON and PITOT HEAT OFF but when I use

fs2020_variable_write("PITOT HEAT OFF", "Bool", true)
fs2020_variable_write("PITOT HEAT ON", "Bool", false) (I presume I would have to use both??)

nothing happens... I'm obviously missing something

So, variable list anyone?

What am I doing wrong?

John

User avatar
Ralph
Posts: 7876
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: FS2020 sim variables

#2 Post by Ralph »

You're doing a variable write on an event.
http://siminnovations.com/wiki/index.ph ... 2020_event

Tetrachromat
Posts: 236
Joined: Sun Feb 14, 2021 6:55 pm

Re: FS2020 sim variables

#3 Post by Tetrachromat »

Hi John

There is no variable with that name "PITOT HEAT OFF" or "PITOT HEAT ON"

There are variables like "PITOT HEAT" or "PITOT HEAT SWITCH" that provide a boolean or enum result for the state of pitot heat (switch), but they are not settable.

You should use the events "PITOT_HEAT_OFF" or "PITOT_HEAT_ON" (note the underscore) like in:

Code: Select all

fs2020_event("PITOT_HEAT_OFF")
Paul

k8jb
Posts: 30
Joined: Mon Jun 07, 2021 5:04 pm

Re: FS2020 sim variables

#4 Post by k8jb »

Great! Thanks for the information. I'll give it a try!

I knew something wasn't right but where do I find a list of the settable items? That's what's eluding me. I've looked at the MSFS2020 SDK and if its in there, its hidden pretty well.


John

Tetrachromat
Posts: 236
Joined: Sun Feb 14, 2021 6:55 pm

Re: FS2020 sim variables

#5 Post by Tetrachromat »

You can access that information directly out of Air Manager. Select that 'Create/Edit' tab. Then from the Tool Bar select 'Simulator Data', in the drop down list there is the option 'FS2020'

It will open the public SDK documentation in your browser. There are 5 sections in 'Simulation Variables', the moste important of them are:
  • Aircraft Simulation Variables
  • General Simulation Variables
  • Legacy Event IDs
Almost everything documented is correct. There are a few mistakes in the documents, as well as some undocumented variables. It's a leraning curve you must go through yourself.

Paul

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: FS2020 sim variables

#6 Post by jph »

John,
it is worth noting that the event IDs you are looking are are 'legacy' ("The EventIds listed here are purely for reference and legacy support") and hence appear to deprecated (subject to change / removal at any time - if they ever get around to it)
At least they may work for now.
Joe. CISSP, MSc.

k8jb
Posts: 30
Joined: Mon Jun 07, 2021 5:04 pm

Re: FS2020 sim variables

#7 Post by k8jb »

Thanks everybody, I'll check them out! I did get pitot heat and anti-icing working...

John

Post Reply