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		= "F\nL\nI\nR"
		mpcd_mm_btn_01.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_01)

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		= "D\nM\nT"
		mpcd_mm_btn_03.stringdefs	= MPCD_default_font_size
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		= "S\nM\nS"
		mpcd_mm_btn_04.stringdefs	= MPCD_default_font_size
		mpcd_mm_btn_04.controllers	= {{"BIT1_Option"}}
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		= "M\nS\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_09				= CreateElement "ceStringPoly"
		mpcd_mm_btn_09.name			= "mpcd_mm_btn_09"
		mpcd_mm_btn_09.material		= mpcd_font_base
		mpcd_mm_btn_09.init_pos		= mpcd_btn_09_pos
		mpcd_mm_btn_09.alignment	= "CenterCenter"
		mpcd_mm_btn_09.value		= "ATHS"
		mpcd_mm_btn_09.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_09)

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_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		= "C\nM\nD\nS"
		mpcd_mm_btn_13.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_13)

local	mpcd_mm_btn_16				= CreateElement "ceStringPoly"
		mpcd_mm_btn_16.name			= "mpcd_mm_btn_16"
		mpcd_mm_btn_16.material		= mpcd_font_base
		mpcd_mm_btn_16.init_pos		= mpcd_btn_16_pos
		mpcd_mm_btn_16.alignment	= "CenterCenter"
		mpcd_mm_btn_16.value		= "DBST"
		mpcd_mm_btn_16.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_16)

local	mpcd_mm_btn_17				= CreateElement "ceStringPoly"
		mpcd_mm_btn_17.name			= "mpcd_mm_btn_17"
		mpcd_mm_btn_17.material		= mpcd_font_base
		mpcd_mm_btn_17.init_pos		= mpcd_btn_17_pos
		mpcd_mm_btn_17.alignment	= "CenterCenter"
		mpcd_mm_btn_17.value		= "FBST"
		mpcd_mm_btn_17.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_17)

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_19				= CreateElement "ceStringPoly"
		mpcd_mm_btn_19.name			= "mpcd_mm_btn_19"
		mpcd_mm_btn_19.material		= mpcd_font_base
		mpcd_mm_btn_19.init_pos		= mpcd_btn_19_pos
		mpcd_mm_btn_19.alignment	= "CenterCenter"
		mpcd_mm_btn_19.value		= "SMSFF"
		mpcd_mm_btn_19.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_19)

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		= "BIT2"
		mpcd_mm_btn_20.stringdefs	= MPCD_default_font_size
Add_MPCD_Element(mpcd_mm_btn_20)

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

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

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

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

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

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

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

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

-- Device Status
local dRow = 0.75

for i = 1, 8 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	= {{"BIT1_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	= {{"BIT1_Failure_Code", i}}
			device_errcode.stringdefs	= MPCD_data1_font_size
	Add_MPCD_Element(device_errcode)
end