Hi Team
I have the project to build a KingAir 350i home cockpit with MSFS 2020, Arduino and Air Manager.
After spending a lot of time, I can't find the answer to my problem. On the same computer, I have :
- MSFS2020
- FSUIPC (latest registered version)
- Air Manager (latest registered version)
- SPAD.neXt (latest registered version)
- Arduino MEGA2560 (original board)
I would like to use Air manager to manage a Avionics Master Switch (complex routine) which works with SPAD.neXt.
What is the routine for reproducing this action with Air Manager?
Thank you by advance for your support.
Air Manager - MSFS 2020 - Complex Lvars
- PilotOlivier
- Posts: 12
- Joined: Sun Aug 07, 2022 7:17 pm
Air Manager - MSFS 2020 - Complex Lvars
Pilot Olivier
MSFS 2020 - KIng Air 350i - Steam Gauge Overhaul - Analog King Air
Air Manager - SPAD.neXt
Arduino MEGA2560
MSFS 2020 - KIng Air 350i - Steam Gauge Overhaul - Analog King Air
Air Manager - SPAD.neXt
Arduino MEGA2560
Re: Air Manager - MSFS 2020 - Complex Lvars
You just need to setup your switch or button callback to send those same events using fs2020_event(). See the relelevant wiki page for details.
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Re: Air Manager - MSFS 2020 - Complex Lvars
For the Avionics master switch on the KA 350i, a mere
seems to be working as expected.
Why do you want to setup complex electrical buses like in the SPAD Next code?
As per using the stock KA 350i in MSFS for a home cockpit, it appears to be a frustrating experience, since a LOT of switches/functions are NOT implemented, unless you are using a specific addon?
[EDIT]
Is it the Just Flight Black Square Steam gauge mod? In that case, it's a different story, but since I don't have it, can't be of too much use, sorry.
But you could try something like this (Have no ways to test it, since I don't have the addon)
Code: Select all
fs2020_event("TOGGLE_AVIONICS_MASTER")
Why do you want to setup complex electrical buses like in the SPAD Next code?
As per using the stock KA 350i in MSFS for a home cockpit, it appears to be a frustrating experience, since a LOT of switches/functions are NOT implemented, unless you are using a specific addon?
[EDIT]
Is it the Just Flight Black Square Steam gauge mod? In that case, it's a different story, but since I don't have it, can't be of too much use, sorry.
But you could try something like this (Have no ways to test it, since I don't have the addon)
Code: Select all
fs2020_variable_write("L:VAR_AVIONICSMASTERSWITCH","INT",1)
fs2020_event("ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE",17,4)
fs2020_event("ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE",19,2)
fs2020_event("ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE",21,3)
fs2020_event("ELECTRICAL_CIRCUIT_TOGGLE",131)
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ
- PilotOlivier
- Posts: 12
- Joined: Sun Aug 07, 2022 7:17 pm
Re: Air Manager - MSFS 2020 - Complex Lvars
HI JackZ
Thank you for your reply and your help. I've been working on this and here's my feedback which may help home builders
Yes, I use the mod "Just Flight Black Square Steam gauge" which is really better than the MSFS version.
Here's the routine that works well:
-- ARDUINO_NANO_A_D2 / Avionics Master
function switch_NANO_A_D2(Position_Switch)
if Position_Switch == 1 then
fs2020_variable_write("L:VAR_AVIONICSMASTERSWITCH","INT",0)
fs2020_event("ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE",17,4)
fs2020_event("ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE",19,2)
fs2020_event("ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE",21,3)
else
fs2020_variable_write("L:VAR_AVIONICSMASTERSWITCH","INT",1)
fs2020_event("ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE",17,4)
fs2020_event("ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE",19,2)
fs2020_event("ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE",21,3)
fs2020_event("ELECTRICAL_CIRCUIT_TOGGLE",131)
end
end
hw_switch_add("ARDUINO_NANO_A_D2", switch_NANO_A_D2)
Finally, my idea is to use Air Manager only and not SPAD.neXt .... - that's why I'm asking the Air Manager Community!
Thank you for your reply and your help. I've been working on this and here's my feedback which may help home builders
Yes, I use the mod "Just Flight Black Square Steam gauge" which is really better than the MSFS version.
Here's the routine that works well:
-- ARDUINO_NANO_A_D2 / Avionics Master
function switch_NANO_A_D2(Position_Switch)
if Position_Switch == 1 then
fs2020_variable_write("L:VAR_AVIONICSMASTERSWITCH","INT",0)
fs2020_event("ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE",17,4)
fs2020_event("ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE",19,2)
fs2020_event("ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE",21,3)
else
fs2020_variable_write("L:VAR_AVIONICSMASTERSWITCH","INT",1)
fs2020_event("ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE",17,4)
fs2020_event("ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE",19,2)
fs2020_event("ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE",21,3)
fs2020_event("ELECTRICAL_CIRCUIT_TOGGLE",131)
end
end
hw_switch_add("ARDUINO_NANO_A_D2", switch_NANO_A_D2)
Finally, my idea is to use Air Manager only and not SPAD.neXt .... - that's why I'm asking the Air Manager Community!
Pilot Olivier
MSFS 2020 - KIng Air 350i - Steam Gauge Overhaul - Analog King Air
Air Manager - SPAD.neXt
Arduino MEGA2560
MSFS 2020 - KIng Air 350i - Steam Gauge Overhaul - Analog King Air
Air Manager - SPAD.neXt
Arduino MEGA2560
- samburner3
- Posts: 16
- Joined: Thu Apr 16, 2020 9:29 am
- Location: Australia
Re: Air Manager - MSFS 2020 - Complex Lvars
Does AM even support writing lvars?
In the wiki it mentions subscribe (read lvars) but no mention of writing them...
Did the above peice of code work for you??
I am trying to find out; https://siminnovations.com/forums/viewtopic.php?t=7828
Code: Select all
fs2020_variable_write("L:VAR_AVIONICSMASTERSWITCH","INT",1)
Did the above peice of code work for you??
I am trying to find out; https://siminnovations.com/forums/viewtopic.php?t=7828