Loading panels to multiple displays in order

Peer support for Air Manager desktop users

Moderators: russ, Ralph

Message
Author
SimPassion
Posts: 5336
Joined: Thu Jul 27, 2017 12:22 am

Re: Loading panels to multiple displays in order

#11 Post by SimPassion »

erj145sim wrote: Wed Nov 09, 2022 1:52 am One more question…I know I should have found the answer in the forum already, but how do I use a hardware switch to actually start a panel in air manager (if I don’t want the panel to start automatically and don’t want to manually do it via Air Manager’s UI? Is there a way?
Thanks again so much.

Marco
Already explained, please start playing with panel creation in the [Create/Edit] tab and use the available feature to manage instrument UUID, then show or hide the instrument as required with visible and/or opacity statement

The simpler sample is here :
https://siminnovations.com/wiki/index.p ... rument_get

https://siminnovations.com/wiki/index.php?title=Visible
https://siminnovations.com/wiki/index.php?title=Opacity

https://siminnovations.com/wiki/index.p ... Instrument

image.png

As a sample the panel where UUID are managed and shown or hidden :

Code: Select all

-- =====================================================================================
-- 							Generic Automated Panel Loader
-- =====================================================================================


-- WARNING !!! : Don't change the order in which each function appears in this script, otherwise the real time switching will not behave as expected


-- #1	PANEL TYPE 1 : PA-28 Carburetor
-- #2	PANEL TYPE 1 : PA-28 Carburetor + HSI
-- #3	PANEL TYPE 2 : PA-28 Injection
-- #4	PANEL TYPE 2 : PA-28 Injection + HSI
-- #5	PANEL TYPE 3 : PA-28 Injection + EFD1000

-- Aircrafts Handled
--	See GENERIC	Aircraft Auto Config instrument

----------------------------------------
--			AUTHORING SECTION
----------------------------------------

-- Values to be updated by Authors

 local AM_Main_Release = "AM3.7.9"		-- Current minimum AM release
 local PA_28_PL = "1.0.1"				-- Current release
 local Date_Release = "08/31/2020"		-- Current release date
 
--=============================================================================
--=============================================================================

-- Don't change these values
-- or at least,
-- only for personal usage

 local Title = "Generic Panels Auto Loader"
 local InitialRelease_Date="08/30/2020"
 local InitialAuthor = "enjxp_SimPassion" -- "enjxp" on x-plane.org forum and "SimPassion" on Sim Innovations forum (same person)

----------------------------------------
--			RELEASE SECTION
----------------------------------------

--	Author						Date			Release		Comments
--	-----------------			----------		-------		------------------------------------------------
--	enjxp_SimPassion			08/31/2020		1.0.1		Fixed Issues where instruments are still displayed when switching from a previous panel
--															Cleaning script
--	enjxp_SimPassion			08/30/2020		1.0.0		Initial Public Release
--	enjxp_SimPassion			08/10/2020		0.1.6		Adding ASPEN SI availability check
--	enjxp_SimPassion			08/10/2020		0.1.5		Initial build for publishing
--	enjxp_SimPassion			08/09/2020		0.1.4		Merged the previous 3 available "si_variable_subscribe" into a unique call to avoid issues on live Aircraft switching
--	enjxp_SimPassion			08/09/2020		0.1.3		Fixed duplicate entry for Auto Conf instrument
--															Globally Switched from "am_variable_" to "si_variable_" naming
--	enjxp_SimPassion			04/22/2020		0.1.2		Adding Custom Instruments
--															Adding Custom Property for Debugging Mode
--															Enhanced Debugging area and data
--															Adding Sim Innovations Premium Aspen EFD1000 handling
--															Adding generic Aspen EFD1000 handling
--	enjxp_SimPassion			03/01/2020		0.1.1		Uniform naming
--															Relocating Clusters
--	enjxp_SimPassion			10/01/2019		0.1.0		Initial release
--	enjxp_SimPassion			30/09/2019		0.0.4		Enhancements
--	enjxp_SimPassion			26/09/2019		0.0.3		Testing
--	enjxp_SimPassion			26/09/2019		0.0.2		Testing
--	enjxp_SimPassion			08/10/2019		0.0.1		Script coding start

---------------------------------------------------------------
--							INITS
---------------------------------------------------------------

up_debug_bln = user_prop_add_boolean("Enable Debugging", false, "Enable/Disable Debugging Mode")
local local_debug = user_prop_get(up_debug_bln)
up_SI_aspen_bln = user_prop_add_boolean("Enable Sim Innovation Premium Aspen EFD1000", false, "Enable Sim Innovation Premium Aspen EFD1000 usage if available, in place of generic EFD")
local local_SI_aspen = user_prop_get(up_SI_aspen_bln)

am_debug = si_variable_create("AM_global_debug", "BOOL", false)
si_variable_write(am_debug,local_debug)

local acfnbr				= "00"
local acfname				= "Unknown Aircraft"
local panel_name			= "Switching to #1 Default Panel"
local panel_type			= 0
local cockpit_light			= 1
local primer_type			= 1
local carb_alt				= 1
local hsi_inst				= 0
local steam_glass			= 0

local panel_type_unknown	= 0
local panel_type1			= 1
local panel_type2_hsi		= 2
local panel_type3			= 3
local panel_type4_hsi		= 4
local panel_type5_efd		= 5
local panel_type6_km		= 6

local local_SI_avail		= false

local panel_name1			= "Panel Type #1 Carburetor"
local panel_name2			= "Panel Type #2 Carburetor HSI"
local panel_name3			= "Panel Type #3 Injection"
local panel_name4			= "Panel Type #4 Injection HSI"
local panel_name5			= "Panel Type #5 Carburetor EFD"
local panel_name6			= "Panel Type #6 Carburetor ASI KM"

--------------------------------------------
--				FONTS TEMPLATES
--------------------------------------------

local fnt0 = "inconsolata_bold.ttf"
local fntsz0 = 28
local fnt1 = "roboto_bold.ttf"
local fntsz1 = 28
local fnt2 = "arimo_regular.ttf"
local fntsz2 = 28
local fntsz	= fntsz0

--------------------------------------------
--------------------------------------------
--		INIT LEDs Displays FONTS
--------------------------------------------

local fnt	= fnt0

if fnt == fnt0 then
	fntsz	= fntsz0
elseif fnt == fnt1 then
	fntsz	= fntsz1
elseif fnt == fnt2 then
	fntsz	= fntsz2
end

txt_panel = txt_add("", "font:"..fnt.."; size:"..fntsz.."; color:#00FF00; halign:left;", 10, 5, 1000, fntsz)

--------------------------------------------
--------------------------------------------

--=============================================================================
---------------------------------------------------------------
--					LOCATIONS DEFINITION
---------------------------------------------------------------
--=============================================================================


--=================================================
--					INSTRUMENTS
--=================================================

---------------------------------------------------
---------------------------------------------------
--		Panels ALL Type Common Parts location
---------------------------------------------------
---------------------------------------------------

t0_x01 = 0	 	t0_y01 = 0	 	t0_w01 = 1920 	t0_h01 = 1080						-- id_all_panel_&_overlay	PANEL		PA28				PA-28
		
y4all = 840		
		
t_x01 =  40 				t_y01 = y4all 	t_w01 = 60 		t_h01 = t_w01 * 1.877	-- id_cust_light 			TOOL		CUST_LIGHT			CUSTOM INSTRUMENTS LIGHT DIAL
t_x02 = t_x01 + t_w01	 	t_y02 = y4all 	t_w02 = t_w01 	t_h02 = t_h01			-- id_cust_glass 			TOOL		CUST_GLASS			CUSTOM INSTRUMENTS GLASS DIAL
t_x03 = t_x01 + 360			t_y03 = y4all 	t_w03 = t_w01 	t_h03 = t_h01			-- id_cust_mask 			TOOL		CUST_MASK			CUSTOM INSTRUMENTS MASK DIAL
t_x04 = t_x03 + t_w01		t_y04 = y4all 	t_w04 = t_w01 	t_h04 = t_h01			-- id_park_set 				TOOL		PARK_SET			ENGAGE PARKING BRAKES
t_x05 = t_x04 + t_w01		t_y05 = y4all 	t_w05 = t_w01 	t_h05 = t_h01			-- id_refuel_tnk 			TOOL		REFUEL_TANK			TRIGGER REFUELING

---------------------------------------------------
--		Panels Type #1 & #2 Common Parts location
---------------------------------------------------

t1_x01 = 35 	t1_y01 = 101 	t1_w01 = 228 	t1_h01 = 228	-- id_gyrs 					STEAM		GYRO			GYRO SUCTION
t1_x02 = 299 	t1_y02 = -12 	t1_w02 = 365 	t1_h02 = 365	-- id_asi_ua				STEAM		ASI				AIRSPEED
t1_x03 = 634 	t1_y03 = -5 	t1_w03 = 354 	t1_h03 = 354	-- id_att					STEAM		ATT				ATTITUD
t1_x04 = 969 	t1_y04 = -5 	t1_w04 = 354 	t1_h04 = 354	-- id_alt					STEAM		ALT				ALTITUDE
t1_x05 = 1299 	t1_y05 = -5 	t1_w05 = 354 	t1_h05 = 354	-- id_vor1 					STEAM		VOR				VOR1
t1_x06 = -18 	t1_y06 = 322 	t1_w06 = 354 	t1_h06 = 354	-- id_adf					STEAM		ADF				AUTOMATIC DIRECTION FINDER
t1_x07 = 306 	t1_y07 = 322 	t1_w07 = 354 	t1_h07 = 354	-- id_trn					STEAM		TRN				TURN COORDINATOR
t1_x09 = 966 	t1_y09 = 322 	t1_w09 = 354 	t1_h09 = 354	-- id_vsi					STEAM		VSI				VERTICAL SPEED INDICATOR
t1_x10 = 1300 	t1_y10 = 322 	t1_w10 = 354 	t1_h10 = 354	-- id_vor2 					STEAM		VOR				VOR2
t1_x14 = 1743 	t1_y14 = 908 	t1_w14 = 180 	t1_h14 = 180	-- id_amp					STEAM		AMP				AMPS
t1_x28 = 1640 	t1_y28 = 44 	t1_w28 = 65 	t1_h28 = 65		-- id_antestbtn				BUTTON		ANTSTBTN		ANNUNCIATORS TEST BUTTON
t1_x29 = 1694 	t1_y29 = 45 	t1_w29 = 62 	t1_h29 = 62		-- id_altann				LED			ALTANN			ALT ANNUNCIATOR
t1_x30 = 1758 	t1_y30 = 45 	t1_w30 = 62 	t1_h30 = 62		-- id_oilann				LED			OILANN			OIL ANNUNCIATOR
t1_x31 = 1822 	t1_y31 = 45 	t1_w31 = 62 	t1_h31 = 62		-- id_vacann				LED			VACANN			VAC ANNUNCIATOR
t1_x34 = 1745	t1_y34 = 138	t1_w34 = 80		t1_h34 = 80		-- id_dimlt_red 			LED			DIMLTRED		DIMMABLE LIGHT RED
	
---------------------------------------------------	
--		Panels Type #3 & #4 Common Parts location	
---------------------------------------------------	
	
t3_x01 = 30 	t3_y01 = 87 	t3_w01 = 240 	t3_h01 = 240	-- id_gyrs 					STEAM		GYRO			GYRO SUCTION
t3_x02 = 299 	t3_y02 = -19 	t3_w02 = 365 	t3_h02 = 365	-- id_asi_ua				STEAM		ASI				AIRSPEED
t3_x03 = 634 	t3_y03 = -12 	t3_w03 = 354 	t3_h03 = 354	-- id_att					STEAM		ATT				ATTITUD
t3_x04 = 969 	t3_y04 = -12 	t3_w04 = 354 	t3_h04 = 354	-- id_alt					STEAM		ALT				ALTITUDE
t3_x05 = 1299 	t3_y05 = -12 	t3_w05 = 354 	t3_h05 = 354	-- id_vor1 					STEAM		VOR				VOR1
t3_x06 = -18 	t3_y06 = 315 	t3_w06 = 354 	t3_h06 = 354	-- id_adf					STEAM		ADF				AUTOMATIC DIRECTION FINDER
t3_x07 = 306 	t3_y07 = 315 	t3_w07 = 354 	t3_h07 = 354	-- id_trn					STEAM		TRN				TURN COORDINATOR
t3_x09 = 966 	t3_y09 = 315 	t3_w09 = 354 	t3_h09 = 354	-- id_vsi					STEAM		VSI				VERTICAL SPEED INDICATOR
t3_x10 = 1300 	t3_y10 = 315 	t3_w10 = 354 	t3_h10 = 354	-- id_vor2 					STEAM		VOR				VOR2
t3_x11 = 28 	t3_y11 = 713 	t3_w11 = 522 	t3_h11 = 92		-- id_oacl 					CLUSTER		OACL			OIL ALTERN AMPS 
t3_x12 = 980 	t3_y12 = 713 	t3_w12 = 522 	t3_h12 = 92		-- id_flcl 					CLUSTER		FLCL			FUEL
t3_x13 = 1116 	t3_y13 = 797 	t3_w13 = 325 	t3_h13 = 325	-- id_rpm					STEAM		RPM				ROUNDS PER MINUTE
t3_x14 = 1630 	t3_y14 = 855 	t3_w14 = 230 	t3_h14 = 230	-- id_amp					STEAM		AMP				AMPS
t3_x16 = 825 	t3_y16 = 800 	t3_w16 = 320 	t3_h16 = 320	-- id_egt					STEAM		EGT				EXHAUST GAS TEMPERATURE
t3_x17 = 1568 	t3_y17 = 681 	t3_w17 = 28 	t3_h17 = 124	-- id_swltnav				SWITCH		SWLTNAV			LIGHT NAV
t3_x18 = 1598 	t3_y18 = 681 	t3_w18 = 33 	t3_h18 = 124	-- id_swbatmst				SWITCH		SWBATMSTR		BATTERY MASTER
t3_x19 = 1626 	t3_y19 = 681 	t3_w19 = 33 	t3_h19 = 124	-- id_swaltgen				SWITCH		SWALTGEN		ALTERNATOR/GENERATOR
t3_x20 = 1654 	t3_y20 = 681 	t3_w20 = 60 	t3_h20 = 124	-- id_swflpmp				SWITCH		SWFLPMP			FUEL PUMP
t3_x21 = 1705 	t3_y21 = 681 	t3_w21 = 60 	t3_h21 = 124	-- id_swltldg				SWITCH		SWLTLDG			LANDING LIGHTS
t3_x22 = 1758 	t3_y22 = 681 	t3_w22 = 33 	t3_h22 = 124	-- id_swltbcn				SWITCH		SWLTBCN			BEACON LIGHTS
t3_x23 = 1812 	t3_y23 = 681 	t3_w23 = 60 	t3_h23 = 124	-- id_swpitht				SWITCH		SWPITHT			PITOT HEAT
t3_x24 = 1869 	t3_y24 = 681 	t3_w24 = 50 	t3_h24 = 124	-- id_swltinst				SWITCH		SWLTINST		INSTRUMENTS LIGHTS
t3_x25 = 1547	t3_y25 = 938 	t3_w25 = 105 	t3_h25 = 105	-- id_primer				LEVER		PRIMER			PRIMER
t3_x26 = 1582	t3_y26 = 906 	t3_w26 = 41 	t3_h26 = 140	-- id_carbhtlvr				LEVER		CARBHTLVR		CARBURETOR HEATER
	
t3_x27 = 702 	t3_y27 = 892 	t3_w27 = 170 	t3_h27 = 170	-- id_strtkey				MULTISW		STRTKEY			STARTER KEY				Center	= 762 x 965 / Starter Location = 702 x 892
	
t3_x28 = 1640 	t3_y28 = 37 	t3_w28 = 65 	t3_h28 = 65		-- id_antestbtn				BUTTON		ANTSTBTN		ANNUNCIATORS TEST BUTTON
t3_x29 = 1699 	t3_y29 = 40 	t3_w29 = 59 	t3_h29 = 59		-- id_altann				LED			ALTANN			ALT ANNUNCIATOR
t3_x30 = 1762 	t3_y30 = 40 	t3_w30 = 59 	t3_h30 = 59		-- id_oilann				LED			OILANN			OIL ANNUNCIATOR
t3_x31 = 1825 	t3_y31 = 40 	t3_w31 = 59 	t3_h31 = 59		-- id_vacann				LED			VACANN			VAC ANNUNCIATOR
t3_x32 = 1427 	t3_y32 = 1032 	t3_w32 = 40 	t3_h32 = 40		-- id_gr_left				LED			GRLEFT			GEAR LEFT ANNUNCIATOR
t3_x33 = 1452 	t3_y33 = 980 	t3_w33 = 40 	t3_h33 = 40		-- id_gr_nose				LED			GRNOSE			GEAR NOSE ANNUNCIATOR
t3_x34 = 1477 	t3_y34 = 1032 	t3_w34 = 40 	t3_h34 = 40		-- id_gr_right				LED			GRRGHT			GEAR RIGHT ANNUNCIATOR
t3_x35 = 612 	t3_y35 = 2	 	t3_w35 = 60 	t3_h35 = 60		-- id_gr_unsafe				LED			GRUNSF			GEAR UNSAFE ANNUNCIATOR
t3_x36 = 1448 	t3_y36 = 820 	t3_w36 = 65 	t3_h36 = 150	-- id_gr_lever				LEVER		GRLVR			GEAR LEVER
t3_x38 = 1742	t3_y38 = 127	t3_w38 = 80		t3_h38 = 80		-- id_dimlt_red 			LED			DIMLTRED		DIMMABLE LIGHT RED
t3_x39 = 823 	t3_y39 = 792 	t3_w39 = 320 	t3_h39 = 320	-- id_manff_turbo			STEAM		MANFFTURBO		MANIFOLD PRESSURE & FUEL FLOW TURBO
t3_x40 = 1786 	t3_y40 = 681 	t3_w40 = 33 	t3_h40 = 124	-- id_swltcoll				SWITCH		SWLTCOLL		COLLISION LIGHTS

---------------------------------------------------
---------------------------------------------------
--			Panels Specific location
---------------------------------------------------
---------------------------------------------------

---------------------------------------------------
--		Panel Type #1 Specific parts location
---------------------------------------------------

t1_x08 = 635 	t1_y08 = 322 	t1_w08 = 354 	t1_h08 = 354	-- id_dgy					STEAM		DGY				COMPASS - DIRECTIONAL GYRO
t1_x11 = 26 	t1_y11 = 685 	t1_w11 = 525 	t1_h11 = 92		-- id_oacl 					CLUSTER		OACL			OIL ALTERN AMPS 
t1_x12 = 978 	t1_y12 = 685 	t1_w12 = 525 	t1_h12 = 92		-- id_flcl 					CLUSTER		FLCL			FUEL
t1_x13 = 1202 	t1_y13 = 769 	t1_w13 = 326 	t1_h13 = 326	-- id_rpm					STEAM		RPM				ROUNDS PER MINUTE
t1_x16 = 1741 	t1_y16 = 895 	t1_w16 = 190 	t1_h16 = 190	-- id_egt					STEAM		EGT				EXHAUST GAS TEMPERATURE
t1_x17 = 1568 	t1_y17 = 770 	t1_w17 = 28 	t1_h17 = 124	-- id_swltnav				SWITCH		SWLTNAV			LIGHT NAV
t1_x18 = 1598 	t1_y18 = 770 	t1_w18 = 33 	t1_h18 = 124	-- id_swbatmst				SWITCH		SWBATMSTR		BATTERY MASTER
t1_x19 = 1626 	t1_y19 = 770 	t1_w19 = 33 	t1_h19 = 124	-- id_swaltgen				SWITCH		SWALTGEN		ALTERNATOR/GENERATOR
t1_x20 = 1654 	t1_y20 = 770 	t1_w20 = 60 	t1_h20 = 124	-- id_swflpmp				SWITCH		SWFLPMP			FUEL PUMP
t1_x21 = 1705 	t1_y21 = 770 	t1_w21 = 60 	t1_h21 = 124	-- id_swltldg				SWITCH		SWLTLDG			LANDING LIGHTS
t1_x22 = 1758 	t1_y22 = 770 	t1_w22 = 33 	t1_h22 = 124	-- id_swltbcn				SWITCH		SWLTBCN			BEACON LIGHTS
t1_x23 = 1812 	t1_y23 = 770 	t1_w23 = 60 	t1_h23 = 124	-- id_swpitht				SWITCH		SWPITHT			PITOT HEAT
t1_x24 = 1869 	t1_y24 = 770 	t1_w24 = 50 	t1_h24 = 124	-- id_swltinst				SWITCH		SWLTINST		INSTRUMENTS LIGHTS
t1_x25 = 1560	t1_y25 = 959 	t1_w25 = 105 	t1_h25 = 105	-- id_primer				LEVER		PRIMER			PRIMER
t1_x26 = 1690	t1_y26 = 927 	t1_w26 = 41 	t1_h26 = 140	-- id_carbhtlvr				LEVER		CARBHTLVR		CARBURETOR HEATER
	
t1_x27 = 710 	t1_y27 = 919 	t1_w27 = 170 	t1_h27 = 174	-- id_strtkey				MULTISW		STRTKEY			STARTER KEY				Center	= 762 x 965 / Starter Location = 710 x 919
	
t1_x32 = 1786 	t1_y32 = 770 	t1_w32 = 33 	t1_h32 = 124	-- id_swltcoll				SWITCH		SWLTCOLL		COLLISION LIGHTS
t1_x39 = 899 	t1_y39 = 775 	t1_w39 = 300 	t1_h39 = 300	-- id_manff					STEAM		MANFF			MANIFOLD PRESSURE & FUEL FLOW
t1_x15 = 1759	t1_y15 = 492 	t1_w15 = 80	 	t1_h15 = 150	-- id_swavionics 			SWITCH		SWAVIONICS		AVIONICS SWITCH
	
---------------------------------------------------	
--		Panel Type #2 Specific parts location	
---------------------------------------------------	
	
t2_x11 = 26 	t2_y11 = 725 	t2_w11 = 525 	t2_h11 = 92		-- id_oacl 					CLUSTER		OACL			OIL ALTERN AMPS 
t2_x12 = 978 	t2_y12 = 725 	t2_w12 = 525 	t2_h12 = 92		-- id_flcl 					CLUSTER		FLCL			FUEL
	
t2_x27 = 708 	t2_y27 = 896 	t2_w27 = 170 	t2_h27 = 174	-- id_strtkey				MULTISW		STRTKEY			STARTER KEY				Center	= 762 x 965 / Starter Location = 708 x 896
	
t2_x17 = 1568 	t2_y17 = 690 	t2_w17 = 28 	t2_h17 = 124	-- id_swltnav				SWITCH		SWLTNAV			LIGHT NAV
t2_x18 = 1598 	t2_y18 = 690 	t2_w18 = 33 	t2_h18 = 124	-- id_swbatmst				SWITCH		SWBATMSTR		BATTERY MASTER
t2_x19 = 1626 	t2_y19 = 690 	t2_w19 = 33 	t2_h19 = 124	-- id_swaltgen				SWITCH		SWALTGEN		ALTERNATOR/GENERATOR
t2_x20 = 1654 	t2_y20 = 690 	t2_w20 = 60 	t2_h20 = 124	-- id_swflpmp				SWITCH		SWFLPMP			FUEL PUMP
t2_x21 = 1705 	t2_y21 = 690 	t2_w21 = 60 	t2_h21 = 124	-- id_swltldg				SWITCH		SWLTLDG			LANDING LIGHTS
t2_x22 = 1758 	t2_y22 = 690 	t2_w22 = 33 	t2_h22 = 124	-- id_swltbcn				SWITCH		SWLTBCN			BEACON LIGHTS
t2_x32 = 1786 	t2_y32 = 690 	t2_w32 = 33 	t2_h32 = 124	-- id_swltcoll				SWITCH		SWLTCOLL		COLLISION LIGHTS
t2_x23 = 1812 	t2_y23 = 690 	t2_w23 = 60 	t2_h23 = 124	-- id_swpitht				SWITCH		SWPITHT			PITOT HEAT
t2_x24 = 1869 	t2_y24 = 690 	t2_w24 = 50 	t2_h24 = 124	-- id_swltinst				SWITCH		SWLTINST		INSTRUMENTS LIGHTS
t2_x33 = 662 	t2_y33 = 354 	t2_w33 = 302 	t2_h33 = 302	-- id_hsi					STEAM		HSI				HORIZONTAL SITUATION INDICATOR
t2_x13 = 1210 	t2_y13 = 825 	t2_w13 = 310 	t2_h13 = 310	-- id_rpm					STEAM		RPM				ROUNDS PER MINUTE
t2_x39 = 902 	t2_y39 = 826 	t2_w39 = 295 	t2_h39 = 295	-- id_manff					STEAM		MANFF			MANIFOLD PRESSURE & FUEL FLOW
t2_x16 = 1700 	t2_y16 = 855 	t2_w16 = 235 	t2_h16 = 235	-- id_egt					STEAM		EGT				EXHAUST GAS TEMPERATURE
t2_x25 = 1547	t2_y25 = 935 	t2_w25 = 105 	t2_h25 = 105	-- id_primer				LEVER		PRIMER			PRIMER
t2_x26 = 1663	t2_y26 = 903 	t2_w26 = 41 	t2_h26 = 140	-- id_carbhtlvr				LEVER		CARBHTLVR		CARBURETOR HEATER
t2_x05 = 1810	t2_y05 = 399 	t2_w05 = 80	 	t2_h05 = 150	-- id_swavionics 			SWITCH		SWAVIONICS		AVIONICS SWITCH
	
---------------------------------------------------	
--		Panel Type #3 Specific parts location	
---------------------------------------------------	
	
t3_x08 = 635 	t3_y08 = 315 	t3_w08 = 354 	t3_h08 = 354	-- id_dgy					STEAM		DGY				COMPASS - DIRECTIONAL GYRO
t3_x15 = 1810	t3_y15 = 392 	t3_w15 = 80	 	t3_h15 = 150	-- id_swavionics 			SWITCH		SWAVIONICS		AVIONICS SWITCH

---------------------------------------------------
--		Panel Type #4 Specific parts location
---------------------------------------------------

t4_x37 = 659 	t4_y37 = 348 	t4_w37 = 303 	t4_h37 = 303	-- id_hsi					STEAM		HSI				HORIZONTAL SITUATION INDICATOR
t4_x05 = 1810	t4_y05 = 393 	t4_w05 = 80	 	t4_h05 = 150	-- id_swavionics 			SWITCH		SWAVIONICS		AVIONICS SWITCH

---------------------------------------------------
--		Panel Type #5 Specific parts location
---------------------------------------------------

t5_x01 = 656 	t5_y01 = 36 	t5_w01 = 310 	t5_h01 = 615	-- id_aspen_bezel 			GLASS		ASPBZL			ASPEN EFD 1000 BEZEL GENERIC & SI Location
t5_x02 = 675 	t5_y02 = 92 	t5_w02 = 254 	t5_h02 = 468	-- id_aspen_efd1000			GLASS		ASPPFDND		ASPEN EFD 1000 PFD & ND Generic
t5_x03 = 678 	t5_y03 = 92 	t5_w03 = 247 	t5_h03 = 234	-- id_aspen_PFD_SI			GLASS		ASPPFD			ASPEN EFD 1000 SI PFD
t5_x04 = 678 	t5_y04 = 326 	t5_w04 = 247 	t5_h04 = 234	-- id_aspen_ND_SI			GLASS		ASPND			ASPEN EFD 1000 SI ND
t5_x05 = 1810	t5_y05 = 399 	t5_w05 = 80	 	t5_h05 = 150	-- id_swavionics 			SWITCH		SWAVIONICS		AVIONICS SWITCH

---------------------------------------------------
--		Panel Type #6 Specific parts location
---------------------------------------------------

ts6_x01 = 40   	ts6_y01 = 70 	ts6_w01 = 250 	ts6_h01 = 250	-- id_gyrs 					STEAM		GYRO			GYRO SUCTION
ts6_x02 = 300 	ts6_y02 = 40 	ts6_w02 = 300 	ts6_h02 = 300	-- id_wet_cmp 				STEAM		WETCMP			WET COMPASS
ts6_x03 = 600 	ts6_y03 = 40 	ts6_w03 = 300 	ts6_h03 = 300	-- id_vsi					STEAM		VSI				VERTICAL SPEED INDICATOR
ts6_x04 = 0   	ts6_y04 = 340 	ts6_w04 = 300 	ts6_h04 = 300	-- id_asi_ktskm 			STEAM		ASIKTSKM		AIRSPEED SPECIFIC KTS/KPH (KM)
ts6_x05 = 300 	ts6_y05 = 340 	ts6_w05 = 300 	ts6_h05 = 300	-- id_att					STEAM		ATT				ATTITUD
ts6_x06 = 600 	ts6_y06 = 340 	ts6_w06 = 300 	ts6_h06 = 300	-- id_alt					STEAM		ALT				ALTITUDE
ts6_x07 = 0 	ts6_y07 = 640 	ts6_w07 = 300 	ts6_h07 = 300	-- id_trn					STEAM		TRN				TURN COORDINATOR
ts6_x08 = 300 	ts6_y08 = 640 	ts6_w08 = 300 	ts6_h08 = 300	-- id_dgy					STEAM		DGY				COMPASS - DIRECTIONAL GYRO
ts6_x09 = 600 	ts6_y09 = 640 	ts6_w09 = 300 	ts6_h09 = 300	-- id_vor1 					STEAM		VOR				VOR1

ts6_x10 = 0 	ts6_y10 = 0 	ts6_w10 = 300 	ts6_h10 = 300	-- id_rpm					STEAM		RPM				ROUNDS PER MINUTE
ts6_x11 = 0 	ts6_y11 = 300 	ts6_w11 = 270 	ts6_h11 = 270	-- id_oilpr_bar 			STEAM		OILPRBAR		OIL PRESSURE BAR
ts6_x12 = 270 	ts6_y12 = 300 	ts6_w12 = 270 	ts6_h12 = 270	-- id_oiltmp_cel 			STEAM		OILTMPCEL		OIL TEMP CELSIUS
ts6_x13 = 0 	ts6_y13 = 570 	ts6_w13 = 270 	ts6_h13 = 270	-- id_fuelpr_mbar 			STEAM		FUELPRMBAR		FUEL PRESSURE mbar
ts6_x14 = 270 	ts6_y14 = 570 	ts6_w14 = 270 	ts6_h14 = 270	-- id_amp					STEAM		AMP				AMPS
ts6_x15 = 0 	ts6_y15 = 840 	ts6_w15 = 270 	ts6_h15 = 270	-- id_fuelqty_lft 			STEAM		FUELQTYLFT		FUEL QUANTITY LEFT
ts6_x16 = 270 	ts6_y16 = 840 	ts6_w16 = 270 	ts6_h16 = 270	-- id_fuelqty_rgt 			STEAM		FUELQTYRGT		FUEL QUANTITY  RIGHT

ts6_x17 = 656 	ts6_y17 = 36 	ts6_w17 = 206 	ts6_h17 = 310	-- id_trim_elv 				STEAM		TRIMELV			TRIM ELEVATOR
ts6_x18 = 656 	ts6_y18 = 36 	ts6_w18 = 310 	ts6_h18 = 206	-- id_trim_rud 				STEAM		TRIMRUD			TRIM RUDDER

---------------------------------------------------
---------------------------------------------------
--				DIALS LOCATION
---------------------------------------------------
---------------------------------------------------

---------------------------------------------------
--		Panel ALL Type DIALS location
---------------------------------------------------

t6_x01 =  14 	t6_y01 = 587 	t6_w01 = 70 	t6_h01 = 70		-- id_dialadf 				DIAL		DIALADF			REMOTE DIAL 
t6_x02 = 998 	t6_y02 = 256 	t6_w02 = 70 	t6_h02 = 70		-- id_dialalt				DIAL		DIALALT			REMOTE DIAL 
t6_x03 = 777 	t6_y03 = 231 	t6_w03 = 70 	t6_h03 = 70		-- id_dialatt				DIAL		DIALATT			REMOTE DIAL 
t6_x05 = 885 	t6_y05 = 587 	t6_w05 = 70 	t6_h05 = 70		-- id_dialhdg				DIAL		DIALHDG			REMOTE DIAL 
t6_x06 = 660 	t6_y06 = 587 	t6_w06 = 70 	t6_h06 = 70		-- id_dialbrg				DIAL		DIALBRG			REMOTE DIAL 
t6_x07 = 1333 	t6_y07 = 256 	t6_w07 = 70 	t6_h07 = 70		-- id_dialobs1				DIAL		DIALOBS1		REMOTE DIAL 
t6_x08 = 1333 	t6_y08 = 587 	t6_w08 = 70 	t6_h08 = 70		-- id_dialobs2				DIAL		DIALOBS2		REMOTE DIAL 

---------------------------------------------------
--		Panel Type #1 Specific DIALS location
---------------------------------------------------

t1_x40 = 1801 	t1_y40 = 1009 	t1_w40 = 70 	t1_h40 = 70		-- id_dialegt				DIAL		DIALEGT			REMOTE DIAL 

---------------------------------------------------
--		Panel Type #2 & #4 Specific DIALS location
---------------------------------------------------

t24_x01 = 883 	t24_y01 = 581 	t24_w01 = 70 	t24_h01 = 70		-- id_dialhdg_hsi		DIAL		DIALHDGHSI		REMOTE DIAL 
t24_x02 = 672 	t24_y02 = 581 	t24_w02 = 70 	t24_h02 = 70		-- id_dialobs_hsi		DIAL		DIALOBSHSI		REMOTE DIAL 

---------------------------------------------------
--		Panel Type #2 & #5 Specific DIALS location
---------------------------------------------------

t25_x01 = 1783	t25_y01 = 1006 	t25_w01 = 70 	t25_h01 = 70		-- id_dialegt			DIAL		DIALEGT			REMOTE DIAL 

---------------------------------------------------
--		Panel Type #3 & #4 Specific DIALS location
---------------------------------------------------

t34_x01 = 1710 	t34_y01 = 1001 	t34_w01 = 70 	t34_h01 = 70		-- id_dialegt			DIAL		DIALEGT			REMOTE DIAL 

---------------------------------------------------
--		Panel Type #6 Specific DIALS location
---------------------------------------------------

ts6d_x02 = 600 	ts6d_y02 = 570 	ts6d_w02 = 70 	ts6d_h02 = 70		-- id_dialalt				DIAL		DIALALT			REMOTE DIAL 
ts6d_x03 = 414 	ts6d_y03 = 546 	ts6d_w03 = 70 	ts6d_h03 = 70		-- id_dialatt				DIAL		DIALATT			REMOTE DIAL 
ts6d_x05 = 530 	ts6d_y05 = 870 	ts6d_w05 = 70 	ts6d_h05 = 70		-- id_dialhdg				DIAL		DIALHDG			REMOTE DIAL 
ts6d_x06 = 300 	ts6d_y06 = 870 	ts6d_w06 = 70 	ts6d_h06 = 70		-- id_dialbrg				DIAL		DIALBRG			REMOTE DIAL 
ts6d_x07 = 600	ts6d_y07 = 870 	ts6d_w07 = 70 	ts6d_h07 = 70		-- id_dialobs1				DIAL		DIALOBS1		REMOTE DIAL 

-- ts6_x06 = 600 	ts6_y06 = 340 	ts6_w06 = 300 	ts6_h06 = 300	-- id_alt					STEAM		ALT				ALTITUDE
-- ts6_x08 = 300 	ts6_y08 = 640 	ts6_w08 = 300 	ts6_h08 = 300	-- id_dgy					STEAM		DGY				COMPASS - DIRECTIONAL GYRO
-- ts6_x09 = 600 	ts6_y09 = 640 	ts6_w09 = 300 	ts6_h09 = 300	-- id_vor1 					STEAM		VOR				VOR1

ys6_4all = 940

ts6c_x01 =  40 						ts6c_y01 = ys6_4all 	ts6c_w01 = 60 			ts6c_h01 = ts6c_w01 * 1.877		-- id_cust_light 	TOOL	CUST_LIGHT		CUSTOM INSTRUMENTS LIGHT DIAL
ts6c_x02 = ts6c_x01 + ts6c_w01	 	ts6c_y02 = ys6_4all 	ts6c_w02 = ts6c_w01 	ts6c_h02 = ts6c_h01				-- id_cust_glass 	TOOL	CUST_GLASS		CUSTOM INSTRUMENTS GLASS DIAL
ts6c_x03 = ts6c_x01 + 360			ts6c_y03 = ys6_4all 	ts6c_w03 = ts6c_w01 	ts6c_h03 = ts6c_h01				-- id_cust_mask 	TOOL	CUST_MASK		CUSTOM INSTRUMENTS MASK DIAL
ts6c_x04 = ts6c_x03 + ts6c_w01		ts6c_y04 = ys6_4all 	ts6c_w04 = ts6c_w01 	ts6c_h04 = ts6c_h01				-- id_park_set 		TOOL	PARK_SET		ENGAGE PARKING BRAKES
ts6c_x05 = ts6c_x04 + ts6c_w01		ts6c_y05 = ys6_4all 	ts6c_w05 = ts6c_w01 	ts6c_h05 = ts6c_h01				-- id_refuel_tnk 	TOOL	REFUEL_TANK		TRIGGER REFUELING

---------------------------------------------------------------
--				REALTIME INSTRUMENT LINKING FROM UUID
---------------------------------------------------------------

id_egt			= instrument_get("5aeb7935-5ba4-4183-1039-21d05c5f309e")		id_asi_ua		= instrument_get("86a8ec6d-bb86-4435-1c35-c8e180087874")
id_att			= instrument_get("19d99edc-2375-45ac-3ae8-8ec2b320647d")		id_alt			= instrument_get("0c0e5a4a-3f7c-45b8-09e6-2d3e279349d1")
id_vor1 		= instrument_get("fc939b62-6287-4602-38c5-caac2cc6cad1")		id_adf			= instrument_get("8a261bfd-dfa4-4c47-3458-c365fa171e86")
id_trn			= instrument_get("7cb6f953-e737-4240-84ac-6d62ac7e05bf")		id_dgy			= instrument_get("6b9b4990-07f0-4484-913c-93169bafab2c")
id_hsi			= instrument_get("d9ed854f-0b87-46ed-8d1a-fd10d6bb2dca")		id_vsi			= instrument_get("e3edd880-19ff-49e8-2588-f6fd47b9088f")
id_vor2 		= instrument_get("7032eff3-b9a7-42a7-bc7f-adecdd46ec41")		id_oacl 		= instrument_get("309086f7-7063-47fd-83a3-5ad261b6c7cc")
id_flcl 		= instrument_get("8010cf1f-69fc-4070-a057-feda3d195403")		id_rpm			= instrument_get("c710ea25-05bb-4cf4-10b3-4d6073c95802")
id_amp			= instrument_get("4ffa5e57-6ba7-47f7-277a-a546f86df447")		id_gyrs 		= instrument_get("d773983e-e594-4fd2-1ebc-49b5a4772060")
id_manff 		= instrument_get("2ffcc592-ead4-4d02-9413-20591011a0b5")		id_pa28type1	= instrument_get("224a99b1-b404-4d71-0587-d6f7646d3c05")
id_pa28type2hsi	= instrument_get("fb1b83e9-e2ed-484a-21a3-3085fe7b5336")		id_pa28type3	= instrument_get("fbd1704d-feae-4a41-12b6-64532e4570b9")
id_pa28type4hsi	= instrument_get("6279fcc5-ba99-433a-2d60-2a363baa2e3b")		id_pa28type5efd	= instrument_get("49a68266-92cd-405d-8394-c8c5b598bfb1")
id_clredovt1	= instrument_get("b8b42d9a-bcd4-4b0a-93e8-4a45095ac769")		id_clredovt1hsi	= instrument_get("12262656-2369-4ba5-15f0-ce79c9285436")
id_clwhtovt1	= instrument_get("a72b7b88-1f5e-48bb-bbb1-3f57457da8dd")		id_clwhtovt1hsi	= instrument_get("78768f18-adfb-40e5-9287-5f31bc8744be")
id_clredovt2	= instrument_get("8c951e57-a214-438d-3a95-e2d0cdf68eb9")		id_clredovt2hsi	= instrument_get("41c67dc6-395a-4823-0f39-c3ed088d49a9")
id_clwhtovt2	= instrument_get("1ec0cdc6-7ac2-4308-11bb-f69a5b55f7b9")		id_clwhtovt2hsi	= instrument_get("dde85f0f-6a52-419c-8396-32c7ce5963c4")
id_swltnav		= instrument_get("83b6d352-7593-4a3d-88f3-cd8c13f85453")		id_swbatmst		= instrument_get("48290101-0943-46bd-11b8-8a74f6b2b6f7")
id_swaltgen		= instrument_get("20036a6b-6e09-4014-a959-f9b307911521")		id_swflpmp		= instrument_get("af3d322c-9070-415a-21a5-e699c01507b1")
id_swltldg		= instrument_get("41e6e89e-1aea-497e-abbf-1a6b1d1f9d46")		id_swltbcn		= instrument_get("bb6201e9-bac7-4a0d-b66f-1f25381d3418")
id_swltcoll		= instrument_get("79ed9feb-98cb-4b1b-b798-3bc1983dd6e1")		id_swpitht		= instrument_get("4d764550-3478-4c7e-2511-3f448dd4cba7")
id_swltinst		= instrument_get("c233df45-61ad-45a0-3dbb-597b57a73ef3")		id_dimlt_red	= instrument_get("5966289a-46d5-4c09-82d6-605c4aeb27e5")
id_carbhtlvr	= instrument_get("130e0528-1743-472c-ac44-bfc2aa41bd1c")		id_strtkey		= instrument_get("0fb830ab-05f3-4123-912f-01f16819881b")-- visible(id_strtkey,false)
id_antestbt		= instrument_get("19da6fa0-ab9e-42e4-9a70-cfd07397cac7")		id_altann		= instrument_get("a149e091-0712-4edc-ae7b-d5117e094e45")
id_oilann		= instrument_get("96c41ee8-9b1e-4a71-0ed6-153802b79f9c")		id_vacann		= instrument_get("0d9cb861-eb58-4db3-a8a2-8bf1ec5d9bed")
id_primer		= instrument_get("a5f4907c-fa9b-4822-297c-9a69b28cc732")		id_gr_left		= instrument_get("4c5b9cfc-58a8-4cfc-aab6-9e69b3675a92")
id_gr_nose		= instrument_get("12648315-f5fb-4481-b03a-ee3432d791e8")		id_gr_right		= instrument_get("a8ae63dd-4cde-4cc2-a4ed-434910cab83a")
id_gr_unsafe	= instrument_get("59846171-3213-4d26-877c-19b3156b3674")		id_gr_lever		= instrument_get("b794d9b3-9e44-4c3d-8a20-ee3a1d573992")
id_auto_conf	= instrument_get("cb941ee3-24f5-47f2-a038-d4a831978392")		id_manff_turbo	= instrument_get("c94f05ab-eb66-44ef-9c01-9873143e7b03")
id_asi_ktskm	= instrument_get("ee53d32d-629d-487e-82ea-08ef12103f54")		id_wet_cmp		= instrument_get("6f5350b6-cdcc-4bff-04f5-33341def4830")visible(id_wet_cmp,false)

id_fuelpr_mbar	= instrument_get("4187f957-74e0-4831-1139-4022e394a675")
id_fuelqty_lft	= instrument_get("c94e0aa3-109c-4816-b831-2fed9cc1483b")
id_fuelqty_rgt	= instrument_get("dbd50be9-4915-4972-980e-c46af0ccbb61")
id_oilpr_bar	= instrument_get("3970c1a6-dbd8-4d0f-3058-6b2510b292b1")
id_oiltmp_cel	= instrument_get("50ac5e40-31bf-4b86-1cb3-0c0e363b7a0c")
id_trim_elv		= instrument_get("76544b58-67b8-4a5f-9279-057e1394b127")
id_trim_rud		= instrument_get("e35232d6-efc8-4b05-1071-1be0ac8f6800")

id_asp_bezel_SI	= instrument_get("899f005d-7366-4e23-80b0-24fbbee8930b")		-- BEZEL
id_asp_PFD_SI	= instrument_get("a0a72756-5ce4-4aff-3462-24c621c68205")		-- PFD
id_asp_ND_SI	= instrument_get("aa3bc874-0a69-4f9a-1879-5c9906791f53")		-- ND

if id_asp_bezel_SI == nil then
	local_SI_avail = false
else
	local_SI_avail = true
	grp_aspen_SI	= group_add(id_asp_bezel_SI,id_asp_PFD_SI,id_asp_ND_SI)visible(grp_aspen_SI,false)
end

id_asp_bezel	= instrument_get("9124b657-fbcc-42b2-3506-f5f1c8ec0783")visible(id_asp_bezel,false)		-- REWORKED JZ BEZEL
id_asp_efd1000	= instrument_get("2404cc5b-99a4-489c-01ed-32149da20348")visible(id_asp_efd1000,false)		-- REWORKED SI Generic PFD & ND w/o BEZEL

id_swavionics	= instrument_get("c2f6cb75-e0d9-447f-32c2-e5bb374fbfb1")

-- REMOTE DIALS

id_dialalt		= instrument_get("031205f1-a69c-4c15-39ed-8e880ea1680f")		id_dialatt		= instrument_get("c9632405-7911-4ce2-8e35-c7064a9b86c4")
id_dialhdg		= instrument_get("7381d170-94d4-48bb-36e7-5773992f1fa7")		id_dialhdg_hsi	= instrument_get("061010f0-7430-460c-8d53-77a99322cea4")visible(id_dialhdg_hsi,false)
id_dialbrg		= instrument_get("bd80e4d5-2fd0-4e8a-1769-c24f8c5c090a")		id_dialobs_hsi	= instrument_get("a7090714-e703-4962-2ec2-edca49ec0fdf")visible(id_dialobs_hsi,false)
id_dialadf		= instrument_get("8e9efaf0-4d55-486a-b10f-bd6994252cab")		id_dialobs1		= instrument_get("5dedfa8c-0ef0-42b2-ada4-6cc8d04d6990")
id_dialobs2		= instrument_get("d8849b3e-f815-446a-0e23-cfec69cd36a1")		id_dialegt		= instrument_get("4cf3fe79-088f-4ce8-26a7-6bc87410d7ba")

-- DESIGN RELATED DIALS

id_cust_light	= instrument_get("967c3647-bb55-4659-b4ea-1795a0b6be1e")		id_cust_glass	= instrument_get("ebc0e341-e63f-44fe-8088-765560e3458b")
id_cust_mask	= instrument_get("31b29f35-3c54-4792-adab-6a5db05f7a91")

-- OPTIONAL BUTTONS SWITCHES

id_park_set		= instrument_get("2aef25dd-7b1d-47d8-20b0-f68bc18ea0fd")		id_refuel_tnk	= instrument_get("2322b351-1964-464a-0c24-eae702790406")

--------------------------------------------------------------------------
-- BUIDING Z_ORDER : assigning instruments/panels to differents layers
--------------------------------------------------------------------------

-- START from Currenty Panel Layer and layering down behind it

z_val = -1

z_order(id_auto_conf,		z_val)	z_val = z_val -1
z_order(id_dialadf,			z_val)	z_val = z_val -1
z_order(id_dialalt,			z_val)	z_val = z_val -1
z_order(id_dialatt,			z_val)	z_val = z_val -1
z_order(id_dialegt,			z_val)	z_val = z_val -1
z_order(id_dialhdg,			z_val)	z_val = z_val -1
z_order(id_dialhdg_hsi,		z_val)	z_val = z_val -1
z_order(id_dialbrg,			z_val)	z_val = z_val -1
z_order(id_dialobs_hsi,		z_val)	z_val = z_val -1
z_order(id_dialobs1,		z_val)	z_val = z_val -1
z_order(id_dialobs2,		z_val)	z_val = z_val -1
if local_SI_avail == true then
	z_order(id_asp_bezel_SI,	z_val)	z_val = z_val -1
	z_order(id_asp_PFD_SI,		z_val)	z_val = z_val -1
	z_order(id_asp_ND_SI,		z_val)	z_val = z_val -1
end
z_order(id_asp_bezel,		z_val)	z_val = z_val -1
z_order(id_asp_efd1000,		z_val)	z_val = z_val -1
z_order(id_swavionics,		z_val)	z_val = z_val -1
z_order(id_refuel_tnk,		z_val)	z_val = z_val -1
z_order(id_park_set,		z_val)	z_val = z_val -1
z_order(id_cust_mask,		z_val)	z_val = z_val -1
z_order(id_cust_glass,		z_val)	z_val = z_val -1
z_order(id_cust_light,		z_val)	z_val = z_val -1
z_order(id_gr_lever,		z_val)	z_val = z_val -1
z_order(id_gr_unsafe,		z_val)	z_val = z_val -1
z_order(id_gr_right,		z_val)	z_val = z_val -1
z_order(id_gr_nose,			z_val)	z_val = z_val -1
z_order(id_gr_left,			z_val)	z_val = z_val -1
z_order(id_antestbt,		z_val)	z_val = z_val -1
z_order(id_strtkey,			z_val)	z_val = z_val -1
z_order(id_carbhtlvr,		z_val)	z_val = z_val -1
z_order(id_primer,			z_val)	z_val = z_val -1
z_order(id_dimlt_red,		z_val)	z_val = z_val -1
z_order(id_oilann,			z_val)	z_val = z_val -1
z_order(id_altann,			z_val)	z_val = z_val -1
z_order(id_vacann,			z_val)	z_val = z_val -1
z_order(id_swltinst,		z_val)	z_val = z_val -1
z_order(id_swpitht,			z_val)	z_val = z_val -1
z_order(id_swltcoll,		z_val)	z_val = z_val -1
z_order(id_swltbcn,			z_val)	z_val = z_val -1
z_order(id_swltldg,			z_val)	z_val = z_val -1
z_order(id_swflpmp,			z_val)	z_val = z_val -1
z_order(id_swaltgen,		z_val)	z_val = z_val -1
z_order(id_swbatmst,		z_val)	z_val = z_val -1
z_order(id_swltnav,			z_val)	z_val = z_val -1
z_order(id_manff,			z_val)	z_val = z_val -1

z_order(id_clwhtovt2hsi,	z_val)	z_val = z_val -1
z_order(id_clwhtovt2,		z_val)	z_val = z_val -1
z_order(id_clredovt2hsi,	z_val)	z_val = z_val -1
z_order(id_clredovt2,		z_val)	z_val = z_val -1
z_order(id_clwhtovt1hsi,	z_val)	z_val = z_val -1
z_order(id_clwhtovt1,		z_val)	z_val = z_val -1
z_order(id_clredovt1hsi,	z_val)	z_val = z_val -1
z_order(id_clredovt1,		z_val)	z_val = z_val -1
                                    
z_order(id_pa28type5efd,	z_val)	z_val = z_val -1
z_order(id_pa28type4hsi,	z_val)	z_val = z_val -1
z_order(id_pa28type3,		z_val)	z_val = z_val -1
z_order(id_pa28type2hsi,	z_val)	z_val = z_val -1
z_order(id_pa28type1,		z_val)	z_val = z_val -1
z_order(id_hsi,				z_val)	z_val = z_val -1
                                    
z_order(id_manff_turbo,		z_val)	z_val = z_val -1
z_order(id_egt,				z_val)	z_val = z_val -1
z_order(id_amp,				z_val)	z_val = z_val -1
z_order(id_rpm,				z_val)	z_val = z_val -1
z_order(id_flcl,			z_val)	z_val = z_val -1
z_order(id_oacl,			z_val)	z_val = z_val -1
z_order(id_vor2,			z_val)	z_val = z_val -1
z_order(id_vsi,				z_val)	z_val = z_val -1
z_order(id_dgy,				z_val)	z_val = z_val -1
z_order(id_trn,				z_val)	z_val = z_val -1
z_order(id_adf,				z_val)	z_val = z_val -1
z_order(id_vor1,			z_val)	z_val = z_val -1
z_order(id_alt,				z_val)	z_val = z_val -1
z_order(id_att,				z_val)	z_val = z_val -1
z_order(id_asi_ua,			z_val)	z_val = z_val -1
z_order(id_gyrs,			z_val)	z_val = z_val -1

z_order(id_asi_ktskm,		z_val)	z_val = z_val -1
z_order(id_wet_cmp,			z_val)	z_val = z_val -1
z_order(id_fuelpr_mbar,		z_val)	z_val = z_val -1
z_order(id_fuelqty_lft,		z_val)	z_val = z_val -1
z_order(id_fuelqty_rgt,		z_val)	z_val = z_val -1
z_order(id_oilpr_bar,		z_val)	z_val = z_val -1
z_order(id_oiltmp_cel,		z_val)	z_val = z_val -1
z_order(id_trim_elv,		z_val)	z_val = z_val -1
z_order(id_trim_rud,		z_val)	z_val = z_val -1

-- For INFO : the last line above still get "z_val = z_val -1" at the end, which is not used, but already there to facilitate new potential instrument insert on copy&paste operation

--------------------------------------------------------------------------
-- OBJECTS GROUPS DEFINITIONS
--------------------------------------------------------------------------

-- GROUPS NOT DISPALYED ON START : Should stay in the following order (groups not displayed at first, then those that should be displayed on start)

grp_t34_1	= group_add(id_manff_turbo,id_gr_left,id_gr_nose,id_gr_right,id_gr_unsafe,id_gr_lever)visible(grp_t34_1,false)
grp_ts6_1	= group_add(id_gyrs,id_wet_cmp,id_vsi,id_asi_ktskm,id_att,id_alt,id_trn,id_vor1)visible(grp_ts6_1,false)
grp_ts6_2	= group_add(id_rpm,id_oilpr_bar,id_oiltmp_cel,id_fuelpr_mbar,id_amp,id_fuelqty_lft,id_fuelqty_rgt)visible(grp_ts6_2,false)
grp_ts6_3	= group_add(id_trim_elv,id_trim_rud)visible(grp_ts6_3,false)
grp_dial_2	= group_add(id_dialadf,id_dialalt,id_dialegt,id_dialhdg_hsi,id_dialobs_hsi,id_dialobs1,id_dialobs2)visible(grp_dial_2,false)
grp_dial_3	= group_add(id_dialalt,id_dialatt,id_dialhdg,id_dialbrg,id_dialobs1)visible(grp_dial_3,false)

-- GROUPS DISPALYED ON START

grp_tc_1	= group_add(id_gyrs,id_asi_ua,id_att,id_alt,id_vor1,id_adf,id_trn,id_vsi,id_vor2,id_flcl,id_oacl,id_rpm,id_egt)visible(grp_tc_1,true)
grp_t12_1	= group_add(id_manff,id_primer)visible(grp_t12_1,true)
grp_dial_1	= group_add(id_dialadf,id_dialalt,id_dialatt,id_dialegt,id_dialhdg,id_dialbrg,id_dialobs1,id_dialobs2)visible(grp_dial_1,true)

--------------------------------------------------------------------------
-- PANELS PRE-BUILD STAGE
--------------------------------------------------------------------------

move(id_asp_bezel,		t5_x01,t5_y01,t5_w01,t5_h01)
move(id_asp_efd1000,	t5_x02,t5_y02,t5_w02,t5_h02)

if local_SI_avail == true then
	move(id_asp_bezel_SI,	t5_x01,t5_y01,t5_w01,t5_h01)
	move(id_asp_PFD_SI,		t5_x03,t5_y03,t5_w03,t5_h03)
	move(id_asp_ND_SI,		t5_x04,t5_y04,t5_w04,t5_h04)
end

move(id_amp,			t1_x14,t1_y14,t1_w14,t1_h14)
visible(id_amp,false)

-- COMMON FOR DEFAULT PANEL

function init_default_panel()
	move(id_gyrs,			t1_x01,t1_y01,t1_w01,t1_h01)		move(id_asi_ua,			t1_x02,t1_y02,t1_w02,t1_h02)		move(id_att,			t1_x03,t1_y03,t1_w03,t1_h03)
	move(id_alt,			t1_x04,t1_y04,t1_w04,t1_h04)		move(id_vor1,			t1_x05,t1_y05,t1_w05,t1_h05)		move(id_adf,			t1_x06,t1_y06,t1_w06,t1_h06)
	move(id_trn,			t1_x07,t1_y07,t1_w07,t1_h07)		move(id_dgy,			t1_x08,t1_y08,t1_w08,t1_h08)		move(id_vsi,			t1_x09,t1_y09,t1_w09,t1_h09)
	move(id_vor2,			t1_x10,t1_y10,t1_w10,t1_h10)		
	move(id_clredovt1,		t0_x01,t0_y01,t0_w01,t0_h01)
	move(id_clredovt1hsi,	t0_x01,t0_y01,t0_w01,t0_h01)		move(id_clwhtovt2,		t0_x01,t0_y01,t0_w01,t0_h01)		move(id_clwhtovt2hsi,	t0_x01,t0_y01,t0_w01,t0_h01)
	move(id_dimlt_red,		t1_x34,t1_y34,t1_w34,t1_h34)		move(id_antestbt,		t1_x28,t1_y28,t1_w28,t1_h28)		move(id_vacann,			t1_x29,t1_y29,t1_w29,t1_h29)
	move(id_altann,			t1_x30,t1_y30,t1_w30,t1_h30)		move(id_oilann,			t1_x31,t1_y31,t1_w31,t1_h31)		move(id_hsi,			t2_x33,t2_y33,t2_w33,t2_h33)
	move(id_oacl,			t1_x11,t1_y11,t1_w11,t1_h11)		move(id_flcl,			t1_x12,t1_y12,t1_w12,t1_h12)		move(id_swltnav,		t1_x17,t1_y17,t1_w17,t1_h17)
	move(id_swbatmst,		t1_x18,t1_y18,t1_w18,t1_h18)		move(id_swaltgen,		t1_x19,t1_y19,t1_w19,t1_h19)		move(id_swflpmp,		t1_x20,t1_y20,t1_w20,t1_h20)
	move(id_swltldg,		t1_x21,t1_y21,t1_w21,t1_h21)		move(id_swltbcn,		t1_x22,t1_y22,t1_w22,t1_h22)		move(id_swltcoll,		t1_x32,t1_y32,t1_w32,t1_h32)
	move(id_swpitht,		t1_x23,t1_y23,t1_w23,t1_h23)		move(id_swltinst,		t1_x24,t1_y24,t1_w24,t1_h24)		move(id_rpm,			t1_x13,t1_y13,t1_w13,t1_h13)
	move(id_strtkey,		t1_x27,t1_y27,t1_w27,t1_h27)		move(id_manff,			t1_x39,t1_y39,t1_w39,t1_h39)		move(id_egt,			t1_x16,t1_y16,t1_w16,t1_h16)
	move(id_primer,			t1_x25,t1_y25,t1_w25,t1_h25)		move(id_carbhtlvr,		t1_x26,t1_y26,t1_w26,t1_h26)

	move(id_pa28type1,		t0_x01,t0_y01,t0_w01,t0_h01)		move(id_pa28type2hsi,	t0_x01,t0_y01,t0_w01,t0_h01)		move(id_pa28type3,		t0_x01,t0_y01,t0_w01,t0_h01)
	move(id_pa28type4hsi,	t0_x01,t0_y01,t0_w01,t0_h01)		move(id_pa28type5efd,	t0_x01,t0_y01,t0_w01,t0_h01)

	move(id_dialadf,		t6_x01,t6_y01,t6_w01,t6_h01)		move(id_dialobs2,		t6_x08,t6_y08,t6_w08,t6_h08)
	move(id_dialhdg_hsi,	t24_x01,t24_y01,t24_w01,t24_h01)	move(id_dialobs_hsi,	t24_x02,t24_y02,t24_w02,t24_h02)

	move(id_swavionics,		t1_x15,t1_y15,t1_w15,t1_h15)
	move(id_asi_ktskm,		t1_x02,t1_y02,t1_w02,t1_h02)		

	visible(id_pa28type1,true)
end

init_default_panel()

---------------------------------------------------------------
--					MAIN PANELS HANDLING STAGE
---------------------------------------------------------------

function panel_auto(acfdata1, acfdata2, acfconfig)

	if acfdata1 == nil or acfdata2 == nil or acfconfig == nil then
		return
	end

--	Available from CSV Data File : Aircrafts parameters
-------------------------------------------------------

-- Panel Type					#3
-- Main Cockpit Light Color		#4
-- Primer						#5
-- CarbHeat/ALT Air				#6
-- HSI							#7
-- spd_u						#8
-- low_s						#9
-- hi_s							#10
-- grd_s						#11
-- lbl_s						#12
-- wht_s						#13
-- wht_e						#14
-- grn_s						#15
-- ylw_s						#16
-- vne							#17
-- rrv							#18
-- rrs							#19
-- brv							#20
-- brs							#21
-- Author						#22
-- Manufacturer					#23
-- Model						#24
-- Engine HP					#25
-- Aircraft Name				#26


-- AM_global_acfspeed
-----------------------------------
-- spd_u						#8
-- low_s						#9
-- hi_s							#10
-- grd_s						#11
-- lbl_s						#12
-- wht_s						#13
-- wht_e						#14
-- grn_s						#15
-- ylw_s						#16
-- vne							#17
-- rrv							#18
-- rrs							#19
-- brv							#20
-- brs							#21

-- AM_global_acfdata1
-----------------------------------
-- Panel Type					#3
-- Main Cockpit Light Color		#4
-- Primer						#5
-- CarbHeat/ALT Air				#6
-- HSI							#7
-- SteamGlass					Added "on the fly" in AUTO CONFIG

-- AM_global_acfdata2
-----------------------------------
-- Author						#22				
-- Manufacturer					#23				
-- Model						#24				
-- Engine HP					#25				
-- Aircraft Name				#26				

	init_default_panel()

	-- move(id_gyrs,			t1_x01,t1_y01,t1_w01,t1_h01)		move(id_asi_ua,			t1_x02,t1_y02,t1_w02,t1_h02)		move(id_att,			t1_x03,t1_y03,t1_w03,t1_h03)
	-- move(id_alt,			t1_x04,t1_y04,t1_w04,t1_h04)		move(id_vor1,			t1_x05,t1_y05,t1_w05,t1_h05)		move(id_adf,			t1_x06,t1_y06,t1_w06,t1_h06)
	-- move(id_trn,			t1_x07,t1_y07,t1_w07,t1_h07)		move(id_dgy,			t1_x08,t1_y08,t1_w08,t1_h08)		move(id_vsi,			t1_x09,t1_y09,t1_w09,t1_h09)
	-- move(id_vor2,			t1_x10,t1_y10,t1_w10,t1_h10)		
	-- move(id_clredovt1,		t0_x01,t0_y01,t0_w01,t0_h01)
	-- move(id_clredovt1hsi,	t0_x01,t0_y01,t0_w01,t0_h01)		move(id_clwhtovt2,		t0_x01,t0_y01,t0_w01,t0_h01)		move(id_clwhtovt2hsi,	t0_x01,t0_y01,t0_w01,t0_h01)
	-- move(id_dimlt_red,		t1_x34,t1_y34,t1_w34,t1_h34)		move(id_antestbt,		t1_x28,t1_y28,t1_w28,t1_h28)		move(id_vacann,			t1_x29,t1_y29,t1_w29,t1_h29)
	-- move(id_altann,			t1_x30,t1_y30,t1_w30,t1_h30)		move(id_oilann,			t1_x31,t1_y31,t1_w31,t1_h31)		move(id_hsi,			t2_x33,t2_y33,t2_w33,t2_h33)
	-- move(id_oacl,			t1_x11,t1_y11,t1_w11,t1_h11)		move(id_flcl,			t1_x12,t1_y12,t1_w12,t1_h12)		move(id_swltnav,		t1_x17,t1_y17,t1_w17,t1_h17)
	-- move(id_swbatmst,		t1_x18,t1_y18,t1_w18,t1_h18)		move(id_swaltgen,		t1_x19,t1_y19,t1_w19,t1_h19)		move(id_swflpmp,		t1_x20,t1_y20,t1_w20,t1_h20)
	-- move(id_swltldg,		t1_x21,t1_y21,t1_w21,t1_h21)		move(id_swltbcn,		t1_x22,t1_y22,t1_w22,t1_h22)		move(id_swltcoll,		t1_x32,t1_y32,t1_w32,t1_h32)
	-- move(id_swpitht,		t1_x23,t1_y23,t1_w23,t1_h23)		move(id_swltinst,		t1_x24,t1_y24,t1_w24,t1_h24)		move(id_rpm,			t1_x13,t1_y13,t1_w13,t1_h13)
	-- move(id_strtkey,		t1_x27,t1_y27,t1_w27,t1_h27)		move(id_manff,			t1_x39,t1_y39,t1_w39,t1_h39)		move(id_egt,			t1_x16,t1_y16,t1_w16,t1_h16)
	-- move(id_primer,			t1_x25,t1_y25,t1_w25,t1_h25)		move(id_carbhtlvr,		t1_x26,t1_y26,t1_w26,t1_h26)

	-- move(id_pa28type1,		t0_x01,t0_y01,t0_w01,t0_h01)		move(id_pa28type2hsi,	t0_x01,t0_y01,t0_w01,t0_h01)		move(id_pa28type3,		t0_x01,t0_y01,t0_w01,t0_h01)
	-- move(id_pa28type4hsi,	t0_x01,t0_y01,t0_w01,t0_h01)		move(id_pa28type5efd,	t0_x01,t0_y01,t0_w01,t0_h01)

	-- move(id_dialadf,		t6_x01,t6_y01,t6_w01,t6_h01)		move(id_dialobs2,		t6_x08,t6_y08,t6_w08,t6_h08)
	-- move(id_dialhdg_hsi,	t24_x01,t24_y01,t24_w01,t24_h01)	move(id_dialobs_hsi,	t24_x02,t24_y02,t24_w02,t24_h02)

	-- move(id_swavionics,		t1_x15,t1_y15,t1_w15,t1_h15)
	-- move(id_asi_ktskm,		t1_x02,t1_y02,t1_w02,t1_h02)		

	-- visible(id_pa28type1,true)

	if acfconfig ~= "" then
		acfnbr = acfconfig
		
		if acfnbr ~= "00" then
			for item in string.gmatch(acfdata2, '([^,]+)') do
				acfname = item
			end
		
			panel_type		= acfdata1[1]
			cockpit_light	= acfdata1[2]
			primer_type		= acfdata1[3]
			carb_alt		= acfdata1[4]
			hsi_inst		= acfdata1[5]
			steam_glass		= acfdata1[6]

			if panel_type == panel_type1 then
				panel_name = panel_name1
			elseif panel_type == panel_type2_hsi and steam_glass == 0 then
				panel_name = panel_name2
			elseif panel_type == panel_type3 then
				panel_name = panel_name3
			elseif panel_type == panel_type4_hsi then
				panel_name = panel_name4
			elseif panel_type == panel_type2_hsi and steam_glass == 1 then
				panel_name = panel_name5
				panel_type = panel_type5_efd
			elseif panel_type == panel_type6_km then
				panel_name = panel_name6
			end
		else
			acfname			= "Unknown Aircraft"
			panel_name		= "Switching to #1 Default Panel"
			panel_type		= panel_type_unknown
			cockpit_light	= 1
			primer_type		= 1
			carb_alt		= 1
			hsi_inst		= 0
			steam_glass		= 0
		end

	end
	
-- DEBUG

	if local_debug == true then

		txt_set(txt_panel,"ACF NBR : "..acfnbr.." / "..acfname.." / "..panel_name)
		print("=============================================================================")
		print("ACFCONFIG = "..acfconfig)

		log("INFO","LOGFNCT: acfnbr "..acfnbr)
		log("INFO","LOGFNCT: acfname "..acfname)

		print("MAIN : "..acfnbr)

		print("PNLTYP     : "..panel_type)
		print("CKPTLGHT   : "..cockpit_light)
		print("PRIMTYP    : "..primer_type)
		print("CARBALT    : "..carb_alt)
		print("HSIINST    : "..hsi_inst)
		print("STEAMGLASS : "..steam_glass)

		log("INFO","LOG: "..acfname.." : "..panel_name)

	end

-- INSTRUMENTS VISIBILITY AND LOCATION

	visible(id_clredovt1,false)		visible(id_clredovt1hsi,false)		visible(id_clwhtovt1,false)		visible(id_clwhtovt1hsi,false)
	visible(id_clredovt2,false)		visible(id_clredovt2hsi,false)		visible(id_clwhtovt2,false)		visible(id_clwhtovt2hsi,false)
	
	visible(id_asp_bezel,steam_glass==1 and local_SI_aspen==false)
	visible(id_asp_efd1000,steam_glass==1 and local_SI_aspen==false)

	if local_SI_avail == true then
		visible(grp_aspen_SI,steam_glass==1 and local_SI_aspen==true)
	end

	visible(id_hsi,hsi_inst==1)
	visible(id_dgy,hsi_inst==0)
	visible(id_dialatt,steam_glass == 0)

	move(id_cust_light,		t_x01,t_y01,t_w01,t_h01)			move(id_cust_glass,		t_x02,t_y02,t_w02,t_h02)			move(id_cust_mask,		t_x03,t_y03,t_w03,t_h03)
	move(id_park_set,		t_x04,t_y04,t_w04,t_h04)			move(id_refuel_tnk,		t_x05,t_y05,t_w05,t_h05)

	move(id_dialalt,		t6_x02,t6_y02,t6_w02,t6_h02)		move(id_dialatt,		t6_x03,t6_y03,t6_w03,t6_h03)		move(id_dialhdg,		t6_x05,t6_y05,t6_w05,t6_h05)		move(id_dialbrg,		t6_x06,t6_y06,t6_w06,t6_h06)		move(id_dialobs1,		t6_x07,t6_y07,t6_w07,t6_h07)

	visible(id_pa28type1,		(panel_type == panel_type1) or (panel_type == panel_type_unknown))
	visible(id_pa28type2hsi,	panel_type == panel_type2_hsi)
	visible(id_pa28type3,		panel_type == panel_type3)
	visible(id_pa28type4hsi,	panel_type == panel_type4_hsi)
	visible(id_pa28type5efd,	panel_type == panel_type5_efd)

	if (panel_type == panel_type_unknown) or (panel_type == panel_type1) or ((panel_type == panel_type2_hsi) and (steam_glass == 0)) then

		visible(grp_ts6_1,false)
		visible(grp_ts6_2,false)
		visible(grp_ts6_3,false)
		visible(grp_t34_1,false)
		visible(grp_dial_3,false)
		visible(grp_t12_1,true)
		visible(grp_tc_1,true)

		move(id_gyrs,			t1_x01,t1_y01,t1_w01,t1_h01)			move(id_asi_ua,			t1_x02,t1_y02,t1_w02,t1_h02)		move(id_att,			t1_x03,t1_y03,t1_w03,t1_h03)
		move(id_alt,			t1_x04,t1_y04,t1_w04,t1_h04)			move(id_vor1,			t1_x05,t1_y05,t1_w05,t1_h05)		move(id_adf,			t1_x06,t1_y06,t1_w06,t1_h06)
		move(id_trn,			t1_x07,t1_y07,t1_w07,t1_h07)			move(id_dgy,			t1_x08,t1_y08,t1_w08,t1_h08)		move(id_vsi,			t1_x09,t1_y09,t1_w09,t1_h09)
		move(id_vor2,			t1_x10,t1_y10,t1_w10,t1_h10)			
		move(id_dimlt_red,		t1_x34,t1_y34,t1_w34,t1_h34)			move(id_antestbt,		t1_x28,t1_y28,t1_w28,t1_h28)		move(id_vacann,			t1_x29,t1_y29,t1_w29,t1_h29)
		move(id_altann,			t1_x30,t1_y30,t1_w30,t1_h30)			move(id_oilann,			t1_x31,t1_y31,t1_w31,t1_h31)		move(id_hsi,			t2_x33,t2_y33,t2_w33,t2_h33)

		if (panel_type == panel_type1) or (panel_type == panel_type_unknown) then
			move(id_swavionics,		t1_x15,t1_y15,t1_w15,t1_h15)
			move(id_oacl,			t1_x11,t1_y11,t1_w11,t1_h11)		move(id_flcl,			t1_x12,t1_y12,t1_w12,t1_h12)		move(id_swltnav,		t1_x17,t1_y17,t1_w17,t1_h17)
			move(id_swbatmst,		t1_x18,t1_y18,t1_w18,t1_h18)		move(id_swaltgen,		t1_x19,t1_y19,t1_w19,t1_h19)		move(id_swflpmp,		t1_x20,t1_y20,t1_w20,t1_h20)
			move(id_swltldg,		t1_x21,t1_y21,t1_w21,t1_h21)		move(id_swltbcn,		t1_x22,t1_y22,t1_w22,t1_h22)		move(id_swltcoll,		t1_x32,t1_y32,t1_w32,t1_h32)
			move(id_swpitht,		t1_x23,t1_y23,t1_w23,t1_h23)		move(id_swltinst,		t1_x24,t1_y24,t1_w24,t1_h24)		move(id_rpm,			t1_x13,t1_y13,t1_w13,t1_h13)
			move(id_strtkey,		t1_x27,t1_y27,t1_w27,t1_h27)		move(id_manff,			t1_x39,t1_y39,t1_w39,t1_h39)		move(id_egt,			t1_x16,t1_y16,t1_w16,t1_h16)
			move(id_primer,			t1_x25,t1_y25,t1_w25,t1_h25)		move(id_carbhtlvr,		t1_x26,t1_y26,t1_w26,t1_h26)
			move(id_dialegt,		t1_x40,t1_y40,t1_w40,t1_h40)
			visible(grp_dial_2,false)
			visible(grp_dial_1,true)
		end

		if (panel_type == panel_type2_hsi) then
			move(id_swavionics,		t2_x05,t2_y05,t2_w05,t2_h05)
			move(id_oacl,			t2_x11,t2_y11,t2_w11,t2_h11)		move(id_flcl,			t2_x12,t2_y12,t2_w12,t2_h12)		move(id_swltnav,		t2_x17,t2_y17,t2_w17,t2_h17)
			move(id_swbatmst,		t2_x18,t2_y18,t2_w18,t2_h18)		move(id_swaltgen,		t2_x19,t2_y19,t2_w19,t2_h19)		move(id_swflpmp,		t2_x20,t2_y20,t2_w20,t2_h20)
			move(id_swltldg,		t2_x21,t2_y21,t2_w21,t2_h21)		move(id_swltbcn,		t2_x22,t2_y22,t2_w22,t2_h22)		move(id_swltcoll,		t2_x32,t2_y32,t2_w32,t2_h32)
			move(id_swpitht,		t2_x23,t2_y23,t2_w23,t2_h23)		move(id_swltinst,		t2_x24,t2_y24,t2_w24,t2_h24)		move(id_rpm,			t2_x13,t2_y13,t2_w13,t2_h13)
			move(id_strtkey,		t2_x27,t2_y27,t2_w27,t2_h27)		move(id_manff,			t2_x39,t2_y39,t2_w39,t2_h39)		move(id_egt,			t2_x16,t2_y16,t2_w16,t2_h16)
			move(id_primer,			t2_x25,t2_y25,t2_w25,t2_h25)		move(id_carbhtlvr,		t2_x26,t2_y26,t2_w26,t2_h26)
			move(id_dialegt,		t25_x01,t25_y01,t25_w01,t25_h01)
			visible(grp_dial_1,false)
			visible(grp_dial_2,true)
		end
	end

	if (panel_type == panel_type3) or (panel_type == panel_type4_hsi) then
		visible(grp_ts6_1,false)
		visible(grp_ts6_2,false)
		visible(grp_ts6_3,false)
		visible(grp_t12_1,false)
		visible(grp_dial_3,false)
		visible(grp_t34_1,true)
		visible(grp_tc_1,true)
		
		move(id_gyrs,			t3_x01,t3_y01,t3_w01,t3_h01)	move(id_asi_ua,			t3_x02,t3_y02,t3_w02,t3_h02)	move(id_att,			t3_x03,t3_y03,t3_w03,t3_h03)
		move(id_alt,			t3_x04,t3_y04,t3_w04,t3_h04)	move(id_vor1,			t3_x05,t3_y05,t3_w05,t3_h05)	move(id_adf,			t3_x06,t3_y06,t3_w06,t3_h06)
		move(id_trn,			t3_x07,t3_y07,t3_w07,t3_h07)	move(id_dgy,			t3_x08,t3_y08,t3_w08,t3_h08)	move(id_hsi,			t4_x37,t4_y37,t4_w37,t4_h37)
		move(id_vsi,			t3_x09,t3_y09,t3_w09,t3_h09)	move(id_vor2,			t3_x10,t3_y10,t3_w10,t3_h10)	move(id_oacl,			t3_x11,t3_y11,t3_w11,t3_h11)
		move(id_flcl,			t3_x12,t3_y12,t3_w12,t3_h12)	move(id_rpm,			t3_x13,t3_y13,t3_w13,t3_h13)	move(id_amp,			t3_x14,t3_y14,t3_w14,t3_h14)
		move(id_egt,			t3_x14,t3_y14,t3_w14,t3_h14)
		move(id_manff_turbo,	t3_x39,t3_y39,t3_w39,t3_h39)	move(id_swltnav,		t3_x17,t3_y17,t3_w17,t3_h17)
		move(id_swbatmst,		t3_x18,t3_y18,t3_w18,t3_h18)	move(id_swaltgen,		t3_x19,t3_y19,t3_w19,t3_h19)	move(id_swflpmp,		t3_x20,t3_y20,t3_w20,t3_h20)
		move(id_swltldg,		t3_x21,t3_y21,t3_w21,t3_h21)	move(id_swltbcn,		t3_x22,t3_y22,t3_w22,t3_h22)	move(id_swltcoll,		t3_x40,t3_y40,t3_w40,t3_h40)
		move(id_swpitht,		t3_x23,t3_y23,t3_w23,t3_h23)	move(id_swltinst,		t3_x24,t3_y24,t3_w24,t3_h24)	move(id_vacann,			t3_x29,t3_y29,t3_w29,t3_h29)
		move(id_altann,			t3_x30,t3_y30,t3_w30,t3_h30)	move(id_oilann,			t3_x31,t3_y31,t3_w31,t3_h31)	move(id_dimlt_red,		t3_x38,t3_y38,t3_w38,t3_h38)
		move(id_primer,			t3_x25,t3_y25,t3_w25,t3_h25)	move(id_carbhtlvr,		t3_x26,t3_y26,t3_w26,t3_h26)	move(id_strtkey,		t3_x27,t3_y27,t3_w27,t3_h27)
		move(id_antestbt,		t3_x28,t3_y28,t3_w28,t3_h28)	move(id_gr_left,		t3_x32,t3_y32,t3_w32,t3_h32)	move(id_gr_nose,		t3_x33,t3_y33,t3_w33,t3_h33)
		move(id_gr_right,		t3_x34,t3_y34,t3_w34,t3_h34)	move(id_gr_unsafe,		t3_x35,t3_y35,t3_w35,t3_h35)	move(id_gr_lever,		t3_x36,t3_y36,t3_w36,t3_h36)
		move(id_dialegt,		t34_x01,t34_y01,t34_w01,t34_h01)
		if (panel_type == panel_type3) then
			move(id_swavionics,		t3_x15,t3_y15,t3_w15,t3_h15)
			visible(grp_dial_2,false)
			visible(grp_dial_1,true)
		elseif (panel_type == panel_type4_hsi) then
			move(id_swavionics,		t4_x05,t4_y05,t4_w05,t4_h05)
			visible(grp_dial_1,false)
			visible(grp_dial_2,true)
		end

	end

	if (panel_type == panel_type5_efd) then
		-- visible(id_pa28type5efd, true)
		-- move(id_pa28type5efd,	t0_x01,t0_y01,t0_w01,t0_h01)
		visible(grp_ts6_1,false)
		visible(grp_ts6_2,false)
		visible(grp_ts6_3,false)
		visible(grp_t34_1,false)
		visible(grp_t12_1,true)
		visible(grp_tc_1,true)
		visible(id_att,false)			visible(id_hsi,false)			visible(id_dialatt,false)
		visible(grp_dial_1,false)
		visible(grp_dial_3,false)
		visible(grp_dial_2,true)

		visible(id_asp_bezel,steam_glass==1 and local_SI_aspen==false)
		visible(id_asp_efd1000,steam_glass==1 and local_SI_aspen==false)

		if local_SI_avail == true then
			visible(grp_aspen_SI,steam_glass==1 and local_SI_aspen==true)
		end

		move(id_gyrs,			t1_x01,t1_y01,t1_w01,t1_h01)	move(id_asi_ua,			t1_x02,t1_y02,t1_w02,t1_h02)	move(id_att,			t1_x03,t1_y03,t1_w03,t1_h03)
		move(id_alt,			t1_x04,t1_y04,t1_w04,t1_h04)	move(id_vor1,			t1_x05,t1_y05,t1_w05,t1_h05)	move(id_adf,			t1_x06,t1_y06,t1_w06,t1_h06)
		move(id_trn,			t1_x07,t1_y07,t1_w07,t1_h07)	move(id_dgy,			t1_x08,t1_y08,t1_w08,t1_h08)	move(id_vsi,			t1_x09,t1_y09,t1_w09,t1_h09)
		move(id_vor2,			t1_x10,t1_y10,t1_w10,t1_h10)	move(id_rpm,			t1_x13,t1_y13,t1_w13,t1_h13)	move(id_amp,			t1_x14,t1_y14,t1_w14,t1_h14)
		move(id_dimlt_red,		t1_x34,t1_y34,t1_w34,t1_h34)	move(id_antestbt,		t1_x28,t1_y28,t1_w28,t1_h28)	move(id_vacann,			t1_x29,t1_y29,t1_w29,t1_h29)
		move(id_altann,			t1_x30,t1_y30,t1_w30,t1_h30)	move(id_oilann,			t1_x31,t1_y31,t1_w31,t1_h31)	move(id_hsi,			t2_x33,t2_y33,t2_w33,t2_h33)

		move(id_oacl,			t2_x11,t2_y11,t2_w11,t2_h11)	move(id_flcl,			t2_x12,t2_y12,t2_w12,t2_h12)	move(id_swltnav,		t2_x17,t2_y17,t2_w17,t2_h17)
		move(id_swbatmst,		t2_x18,t2_y18,t2_w18,t2_h18)	move(id_swaltgen,		t2_x19,t2_y19,t2_w19,t2_h19)	move(id_swflpmp,		t2_x20,t2_y20,t2_w20,t2_h20)
		move(id_swltldg,		t2_x21,t2_y21,t2_w21,t2_h21)	move(id_swltbcn,		t2_x22,t2_y22,t2_w22,t2_h22)	move(id_swltcoll,		t2_x32,t2_y32,t2_w32,t2_h32)
		move(id_swpitht,		t2_x23,t2_y23,t2_w23,t2_h23)	move(id_swltinst,		t2_x24,t2_y24,t2_w24,t2_h24)	move(id_rpm,			t2_x13,t2_y13,t2_w13,t2_h13)
		move(id_strtkey,		t2_x27,t2_y27,t2_w27,t2_h27)	move(id_manff,			t2_x39,t2_y39,t2_w39,t2_h39)	move(id_egt,			t2_x16,t2_y16,t2_w16,t2_h16)
		move(id_primer,			t2_x25,t2_y25,t2_w25,t2_h25)	move(id_carbhtlvr,		t2_x26,t2_y26,t2_w26,t2_h26)
		move(id_dialegt,		t25_x01,t25_y01,t25_w01,t25_h01)
		move(id_swavionics,		t5_x05,t5_y05,t5_w05,t5_h05)
	end

	if (panel_type == panel_type6_km) then
		visible(grp_ts6_2,false)
		visible(grp_ts6_3,false)
		visible(grp_t12_1,false)
		visible(grp_t34_1,false)
		visible(grp_tc_1,false)
		visible(grp_dial_1,false)
		visible(grp_dial_2,false)
		visible(grp_dial_3,true)
		visible(grp_ts6_1,true)

		move(id_gyrs,			ts6_x01,ts6_y01,ts6_w01,ts6_h01)	move(id_wet_cmp,		ts6_x02,ts6_y02,ts6_w02,ts6_h02)
		move(id_vsi,			ts6_x03,ts6_y03,ts6_w03,ts6_h03)	move(id_asi_ktskm,		ts6_x04,ts6_y04,ts6_w04,ts6_h04)
		move(id_att,			ts6_x05,ts6_y05,ts6_w05,ts6_h05)	move(id_alt,			ts6_x06,ts6_y06,ts6_w06,ts6_h06)
		move(id_trn,			ts6_x07,ts6_y07,ts6_w07,ts6_h07)	move(id_dgy,			ts6_x08,ts6_y08,ts6_w08,ts6_h08)
		move(id_vor1,			ts6_x09,ts6_y09,ts6_w09,ts6_h09)	move(id_rpm,			ts6_x01,ts6_y01,ts6_w01,ts6_h01)	
		move(id_oilpr_bar,		ts6_x01,ts6_y01,ts6_w01,ts6_h01)	move(id_fuelpr_mbar,	ts6_x01,ts6_y01,ts6_w01,ts6_h01)
		move(id_amp,			ts6_x01,ts6_y01,ts6_w01,ts6_h01)	move(id_fuelqty_lft,	ts6_x01,ts6_y01,ts6_w01,ts6_h01)
		move(id_fuelqty_rgt,	ts6_x01,ts6_y01,ts6_w01,ts6_h01)	
		move(id_trim_elv,		ts6_x01,ts6_y01,ts6_w01,ts6_h01)	move(id_trim_rud,		ts6_x01,ts6_y01,ts6_w01,ts6_h01)

		move(id_cust_light,		ts6c_x01,ts6c_y01,ts6c_w01,ts6c_h01)	move(id_cust_glass,		ts6c_x02,ts6c_y02,ts6c_w02,ts6c_h02)	move(id_cust_mask,	ts6c_x03,ts6c_y03,ts6c_w03,ts6c_h03)
		move(id_park_set,		ts6c_x04,ts6c_y04,ts6c_w04,ts6c_h04)	move(id_refuel_tnk,		ts6c_x05,ts6c_y05,ts6c_w05,ts6c_h05)

		move(id_dialalt,		ts6d_x02,ts6d_y02,ts6d_w02,ts6d_h02)	move(id_dialatt,	ts6d_x03,ts6d_y03,ts6d_w03,ts6d_h03)
		move(id_dialhdg,		ts6d_x05,ts6d_y05,ts6d_w05,ts6d_h05)	move(id_dialbrg,	ts6d_x06,ts6d_y06,ts6d_w06,ts6d_h06)
		move(id_dialobs1,		ts6d_x07,ts6d_y07,ts6d_w07,ts6d_h07)

	end

end

si_variable_subscribe("AM_global_acfdata1","INT[6]",
						"AM_global_acfdata2","STRING",
						"AM_global_acfconfig","STRING",
						panel_auto)

-- "sim/aircraft/prop/acf_en_type", INT[8],		-- 0 = Carburetor  / 1 = Injection

 

erj145sim
Posts: 34
Joined: Mon Feb 10, 2020 1:03 pm

Re: Loading panels to multiple displays in order

#12 Post by erj145sim »

Awesome, thanks again so much!
Marco

Post Reply