dofile(LockOn_Options.script_path.."MPCD/indicator/MPCD_definitions.lua")

-- Menu Options
local	mpcd_mm_btn_01				= CreateElement "ceStringPoly"
		mpcd_mm_btn_01.name			= "mpcd_mm_btn_01"
		mpcd_mm_btn_01.material		= mpcd_font_base
		mpcd_mm_btn_01.init_pos		= mpcd_btn_01_pos
		mpcd_mm_btn_01.alignment	= "CenterCenter"
		mpcd_mm_btn_01.value		= "D\nS\nS"
		mpcd_mm_btn_01.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_01)

local	mpcd_mm_btn_02				= CreateElement "ceStringPoly"
		mpcd_mm_btn_02.name			= "mpcd_mm_btn_02"
		mpcd_mm_btn_02.material		= mpcd_font_base
		mpcd_mm_btn_02.init_pos		= mpcd_btn_02_pos
		mpcd_mm_btn_02.alignment	= "CenterCenter"
		mpcd_mm_btn_02.value		= "D\nS\nP\nL\nY"
		mpcd_mm_btn_02.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_02)

local	mpcd_mm_btn_03				= CreateElement "ceStringPoly"
		mpcd_mm_btn_03.name			= "mpcd_mm_btn_03"
		mpcd_mm_btn_03.material		= mpcd_font_base
		mpcd_mm_btn_03.init_pos		= mpcd_btn_03_pos
		mpcd_mm_btn_03.alignment	= "CenterCenter"
		mpcd_mm_btn_03.value		= "G\nP\nS"
		mpcd_mm_btn_03.stringdefs	= MPCD_default_font_size
		mpcd_mm_btn_03.controllers	= {{"BIT1_Option"}}
Add_MPCD_Element(mpcd_mm_btn_03)

local	mpcd_mm_btn_04				= CreateElement "ceStringPoly"
		mpcd_mm_btn_04.name			= "mpcd_mm_btn_04"
		mpcd_mm_btn_04.material		= mpcd_font_base
		mpcd_mm_btn_04.init_pos		= mpcd_btn_04_pos
		mpcd_mm_btn_04.alignment	= "CenterCenter"
		mpcd_mm_btn_04.value		= "C\nN\nI"
		mpcd_mm_btn_04.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_04)

local	mpcd_mm_btn_05				= CreateElement "ceStringPoly"
		mpcd_mm_btn_05.name			= "mpcd_mm_btn_05"
		mpcd_mm_btn_05.material		= mpcd_font_base
		mpcd_mm_btn_05.init_pos		= mpcd_btn_05_pos
		mpcd_mm_btn_05.alignment	= "CenterCenter"
		mpcd_mm_btn_05.value		= "A\nD\nC"
		mpcd_mm_btn_05.stringdefs	= MPCD_default_font_size
		mpcd_mm_btn_05.controllers	= {{"BIT1_Option"}}
Add_MPCD_Element(mpcd_mm_btn_05)

local	mpcd_mm_btn_06				= CreateElement "ceStringPoly"
		mpcd_mm_btn_06.name			= "mpcd_mm_btn_06"
		mpcd_mm_btn_06.material		= mpcd_font_base
		mpcd_mm_btn_06.init_pos		= mpcd_btn_06_pos
		mpcd_mm_btn_06.alignment	= "CenterCenter"
		mpcd_mm_btn_06.value		= "AUTO"
		mpcd_mm_btn_06.stringdefs	= MPCD_default_font_size
		mpcd_mm_btn_06.controllers	= {{"BIT1_Option"}}
Add_MPCD_Element(mpcd_mm_btn_06)

local	mpcd_mm_btn_07				= CreateElement "ceStringPoly"
		mpcd_mm_btn_07.name			= "mpcd_mm_btn_07"
		mpcd_mm_btn_07.material		= mpcd_font_base
		mpcd_mm_btn_07.init_pos		= mpcd_btn_07_pos
		mpcd_mm_btn_07.alignment	= "CenterCenter"
		mpcd_mm_btn_07.value		= "MAINT"
		mpcd_mm_btn_07.stringdefs	= MPCD_default_font_size
		mpcd_mm_btn_07.controllers	= {{"BIT1_Option"}}
Add_MPCD_Element(mpcd_mm_btn_07)

local	mpcd_mm_btn_08				= CreateElement "ceStringPoly"
		mpcd_mm_btn_08.name			= "mpcd_mm_btn_08"
		mpcd_mm_btn_08.material		= mpcd_font_base
		mpcd_mm_btn_08.init_pos		= mpcd_btn_08_pos
		mpcd_mm_btn_08.alignment	= "CenterCenter"
		mpcd_mm_btn_08.value		= "MI"
		mpcd_mm_btn_08.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_08)

local	mpcd_mm_btn_10				= CreateElement "ceStringPoly"
		mpcd_mm_btn_10.name			= "mpcd_mm_btn_10"
		mpcd_mm_btn_10.material		= mpcd_font_base
		mpcd_mm_btn_10.init_pos		= mpcd_btn_10_pos
		mpcd_mm_btn_10.alignment	= "CenterCenter"
		mpcd_mm_btn_10.value		= "STOP"
		mpcd_mm_btn_10.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_10)

local	mpcd_mm_btn_11				= CreateElement "ceStringPoly"
		mpcd_mm_btn_11.name			= "mpcd_mm_btn_11"
		mpcd_mm_btn_11.material		= mpcd_font_base
		mpcd_mm_btn_11.init_pos		= mpcd_btn_11_pos
		mpcd_mm_btn_11.alignment	= "CenterCenter"
		mpcd_mm_btn_11.value		= "I\nN\nS"
		mpcd_mm_btn_11.stringdefs	= MPCD_default_font_size
		mpcd_mm_btn_11.controllers	= {{"BIT1_Option"}}
Add_MPCD_Element(mpcd_mm_btn_11)

local	mpcd_mm_btn_12				= CreateElement "ceStringPoly"
		mpcd_mm_btn_12.name			= "mpcd_mm_btn_12"
		mpcd_mm_btn_12.material		= mpcd_font_base
		mpcd_mm_btn_12.init_pos		= mpcd_btn_12_pos
		mpcd_mm_btn_12.alignment	= "CenterCenter"
		mpcd_mm_btn_12.value		= "S\nA\nA\nH\nS"
		mpcd_mm_btn_12.stringdefs	= MPCD_default_font_size
		mpcd_mm_btn_12.controllers	= {{"BIT1_Option"}}
Add_MPCD_Element(mpcd_mm_btn_12)

local	mpcd_mm_btn_13				= CreateElement "ceStringPoly"
		mpcd_mm_btn_13.name			= "mpcd_mm_btn_13"
		mpcd_mm_btn_13.material		= mpcd_font_base
		mpcd_mm_btn_13.init_pos		= mpcd_btn_13_pos
		mpcd_mm_btn_13.alignment	= "CenterCenter"
		mpcd_mm_btn_13.value		= "E\nM\nS"
		mpcd_mm_btn_13.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_13)

local	mpcd_mm_btn_14				= CreateElement "ceStringPoly"
		mpcd_mm_btn_14.name			= "mpcd_mm_btn_14"
		mpcd_mm_btn_14.material		= mpcd_font_base
		mpcd_mm_btn_14.init_pos		= mpcd_btn_14_pos
		mpcd_mm_btn_14.alignment	= "CenterCenter"
		mpcd_mm_btn_14.value		= "V\nI\nD\nE\nO"
		mpcd_mm_btn_14.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_14)

local	mpcd_mm_btn_15				= CreateElement "ceStringPoly"
		mpcd_mm_btn_15.name			= "mpcd_mm_btn_15"
		mpcd_mm_btn_15.material		= mpcd_font_base
		mpcd_mm_btn_15.init_pos		= mpcd_btn_15_pos
		mpcd_mm_btn_15.alignment	= "CenterCenter"
		mpcd_mm_btn_15.value		= "D\nV\nM\nS"
		mpcd_mm_btn_15.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_15)

local	mpcd_mm_btn_18				= CreateElement "ceStringPoly"
		mpcd_mm_btn_18.name			= "mpcd_mm_btn_18"
		mpcd_mm_btn_18.material		= mpcd_font_base
		mpcd_mm_btn_18.init_pos		= mpcd_btn_18_pos
		mpcd_mm_btn_18.alignment	= "CenterCenter"
		mpcd_mm_btn_18.value		= "MENU"
		mpcd_mm_btn_18.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_18)

local	mpcd_mm_btn_20				= CreateElement "ceStringPoly"
		mpcd_mm_btn_20.name			= "mpcd_mm_btn_20"
		mpcd_mm_btn_20.material		= mpcd_font_base
		mpcd_mm_btn_20.init_pos		= mpcd_btn_20_pos
		mpcd_mm_btn_20.alignment	= "CenterCenter"
		mpcd_mm_btn_20.value		= "BIT1"
		mpcd_mm_btn_20.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_20)

-- DATA
local	device_sashs				= CreateElement "ceStringPoly"
		device_sashs.name			= "device_sashs"
		device_sashs.material		= mpcd_font_base
		device_sashs.init_pos		= {-0.70, 0.65, 0.0}
		device_sashs.alignment		= "LeftCenter"
		device_sashs.value			= "SAAHS"
		device_sashs.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_sashs)

-- COLUMN A
local	device_gps					= CreateElement "ceStringPoly"
		device_gps.name				= "device_gps"
		device_gps.material			= mpcd_font_base
		device_gps.init_pos			= {-0.70, 0.55, 0.0}
		device_gps.alignment		= "LeftCenter"
		device_gps.value			= "GPS"
		device_gps.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_gps)

local	device_comm_1				= CreateElement "ceStringPoly"
		device_comm_1.name			= "device_comm_1"
		device_comm_1.material		= mpcd_font_base
		device_comm_1.init_pos		= {-0.70, 0.45, 0.0}
		device_comm_1.alignment		= "LeftCenter"
		device_comm_1.value			= "1 COMM"
		device_comm_1.stringdefs	= MPCD_data1_font_size
Add_MPCD_Element(device_comm_1)

local	device_comm_2				= CreateElement "ceStringPoly"
		device_comm_2.name			= "device_comm_2"
		device_comm_2.material		= mpcd_font_base
		device_comm_2.init_pos		= {-0.70, 0.35, 0.0}
		device_comm_2.alignment		= "LeftCenter"
		device_comm_2.value			= "2 COMM"
		device_comm_2.stringdefs	= MPCD_data1_font_size
Add_MPCD_Element(device_comm_2)

local	device_dc_pwr				= CreateElement "ceStringPoly"
		device_dc_pwr.name			= "device_dc_pwr"
		device_dc_pwr.material		= mpcd_font_base
		device_dc_pwr.init_pos		= {-0.70, 0.25, 0.0}
		device_dc_pwr.alignment		= "LeftCenter"
		device_dc_pwr.value			= "DC"
		device_dc_pwr.stringdefs	= MPCD_data1_font_size
Add_MPCD_Element(device_dc_pwr)

local	device_hud					= CreateElement "ceStringPoly"
		device_hud.name				= "device_hud"
		device_hud.material			= mpcd_font_base
		device_hud.init_pos			= {-0.70, 0.15, 0.0}
		device_hud.alignment		= "LeftCenter"
		device_hud.value			= "HUD"
		device_hud.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_hud)

local	device_mpcd					= CreateElement "ceStringPoly"
		device_mpcd.name			= "device_mpcd"
		device_mpcd.material		= mpcd_font_base
		device_mpcd.init_pos		= {-0.70, 0.05, 0.0}
		device_mpcd.alignment		= "LeftCenter"
		device_mpcd.value			= "MPCD"
		device_mpcd.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_mpcd)

local	device_ins					= CreateElement "ceStringPoly"
		device_ins.name				= "device_ins"
		device_ins.material			= mpcd_font_base
		device_ins.init_pos			= {-0.70, -0.05, 0.0}
		device_ins.alignment		= "LeftCenter"
		device_ins.value			= "INS"
		device_ins.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_ins)

local	device_adc					= CreateElement "ceStringPoly"
		device_adc.name				= "device_adc"
		device_adc.material			= mpcd_font_base
		device_adc.init_pos			= {-0.70, -0.15, 0.0}
		device_adc.alignment		= "LeftCenter"
		device_adc.value			= "ADC"
		device_adc.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_adc)

local	device_ems					= CreateElement "ceStringPoly"
		device_ems.name				= "device_ems"
		device_ems.material			= mpcd_font_base
		device_ems.init_pos			= {-0.70, -0.25, 0.0}
		device_ems.alignment		= "LeftCenter"
		device_ems.value			= "EMS"
		device_ems.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_ems)

local	device_igv					= CreateElement "ceStringPoly"
		device_igv.name				= "device_igv"
		device_igv.material			= mpcd_font_base
		device_igv.init_pos			= {-0.70, -0.35, 0.0}
		device_igv.alignment		= "LeftCenter"
		device_igv.value			= "IGV"
		device_igv.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_igv)

-- COLUMN B
local	device_dvms					= CreateElement "ceStringPoly"
		device_dvms.name			= "device_dvms"
		device_dvms.material		= mpcd_font_base
		device_dvms.init_pos		= {0.20, 0.55, 0.0}
		device_dvms.alignment		= "LeftCenter"
		device_dvms.value			= "DVMS"
		device_dvms.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_dvms)

local	device_acnip				= CreateElement "ceStringPoly"
		device_acnip.name			= "device_acnip"
		device_acnip.material		= mpcd_font_base
		device_acnip.init_pos		= {0.20, 0.45, 0.0}
		device_acnip.alignment		= "LeftCenter"
		device_acnip.value			= "ACNIP"
		device_acnip.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_acnip)

local	device_awls					= CreateElement "ceStringPoly"
		device_awls.name			= "device_awls"
		device_awls.material		= mpcd_font_base
		device_awls.init_pos		= {0.20, 0.35, 0.0}
		device_awls.alignment		= "LeftCenter"
		device_awls.value			= "AWLS"
		device_awls.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_awls)

local	device_bcn					= CreateElement "ceStringPoly"
		device_bcn.name				= "device_bcn"
		device_bcn.material			= mpcd_font_base
		device_bcn.init_pos			= {0.20, 0.25, 0.0}
		device_bcn.alignment		= "LeftCenter"
		device_bcn.value			= "BCN"
		device_bcn.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_bcn)

local	device_cnidc				= CreateElement "ceStringPoly"
		device_cnidc.name			= "device_cnidc"
		device_cnidc.material		= mpcd_font_base
		device_cnidc.init_pos		= {0.20, 0.15, 0.0}
		device_cnidc.alignment		= "LeftCenter"
		device_cnidc.value			= "CNIDC"
		device_cnidc.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_cnidc)

local	device_ralt					= CreateElement "ceStringPoly"
		device_ralt.name			= "device_ralt"
		device_ralt.material		= mpcd_font_base
		device_ralt.init_pos		= {0.20, 0.05, 0.0}
		device_ralt.alignment		= "LeftCenter"
		device_ralt.value			= "RALT"
		device_ralt.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_ralt)

local	device_tcn					= CreateElement "ceStringPoly"
		device_tcn.name				= "device_tcn"
		device_tcn.material			= mpcd_font_base
		device_tcn.init_pos			= {0.20, -0.05, 0.0}
		device_tcn.alignment		= "LeftCenter"
		device_tcn.value			= "TCN"
		device_tcn.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_tcn)

local	device_iff					= CreateElement "ceStringPoly"
		device_iff.name				= "device_iff"
		device_iff.material			= mpcd_font_base
		device_iff.init_pos			= {0.20, -0.15, 0.0}
		device_iff.alignment		= "LeftCenter"
		device_iff.value			= "IFF"
		device_iff.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_iff)

local	device_dss					= CreateElement "ceStringPoly"
		device_dss.name				= "device_dss"
		device_dss.material			= mpcd_font_base
		device_dss.init_pos			= {0.20, -0.25, 0.0}
		device_dss.alignment		= "LeftCenter"
		device_dss.value			= "DSS"
		device_dss.stringdefs		= MPCD_data1_font_size
Add_MPCD_Element(device_dss)

-- Device Status
local dRow = 0.65

for i = 2, 11 do
	dRow = dRow - 0.10
	
	local	device_status				= CreateElement "ceStringPoly"
			device_status.name			= "device_status_" .. string.format("%02d", i)
			device_status.material		= mpcd_font_base
			device_status.init_pos		= {-0.45, dRow, 0.0}
			device_status.alignment		= "LeftCenter"
			device_status.formats		= {"%s"}
			device_status.controllers	= {{"BIT2_Device_Status", i}}
			device_status.stringdefs	= MPCD_data1_font_size
	Add_MPCD_Element(device_status)
	
	local	device_errcode				= CreateElement "ceStringPoly"
			device_errcode.name			= "device_errcode_" .. string.format("%02d", i)
			device_errcode.material		= mpcd_font_base
			device_errcode.init_pos		= {-0.30, dRow, 0.0}
			device_errcode.alignment	= "LeftCenter"
			device_errcode.formats		= {"%s"}
			device_errcode.controllers	= {{"BIT2_Failure_Code", i}}
			device_errcode.stringdefs	= MPCD_data1_font_size
	Add_MPCD_Element(device_errcode)
	
end

local dRow = 0.65

for i = 12, 20 do
	dRow = dRow - 0.10
	
	local	device_status				= CreateElement "ceStringPoly"
			device_status.name			= "device_status_" .. string.format("%02d", i)
			device_status.material		= mpcd_font_base
			device_status.init_pos		= {0.45, dRow, 0.0}
			device_status.alignment		= "LeftCenter"
			device_status.formats		= {"%s"}
			device_status.controllers	= {{"BIT2_Device_Status", i}}
			device_status.stringdefs	= MPCD_data1_font_size
	Add_MPCD_Element(device_status)
	
	local	device_errcode				= CreateElement "ceStringPoly"
			device_errcode.name			= "device_errcode_" .. string.format("%02d", i)
			device_errcode.material		= mpcd_font_base
			device_errcode.init_pos		= {0.60, dRow, 0.0}
			device_errcode.alignment	= "LeftCenter"
			device_errcode.formats		= {"%s"}
			device_errcode.controllers	= {{"BIT2_Failure_Code", i}}
			device_errcode.stringdefs	= MPCD_data1_font_size
	Add_MPCD_Element(device_errcode)
	
end

