mirror of
https://github.com/s-d-a/DCS-ExportScripts.git
synced 2026-08-13 17:31:53 +00:00
Optimize function ExportScript.ProcessIkarusDCSConfigLowImportance()
- PUI-800 Weapon panel - UV-26 - EKRAN
This commit is contained in:
@@ -666,11 +666,10 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
|||||||
-- function for Ikarus
|
-- function for Ikarus
|
||||||
|
|
||||||
local lWeaponSystem = GetDevice(12)
|
local lWeaponSystem = GetDevice(12)
|
||||||
local lEKRAN = GetDevice(10)
|
local lCannonAmmoCount = " "
|
||||||
local lCannonAmmoCount = ""
|
|
||||||
local lStationNumbers = lWeaponSystem:get_selected_weapon_stations()
|
local lStationNumbers = lWeaponSystem:get_selected_weapon_stations()
|
||||||
local lStationCount = ""
|
local lStationCount = " "
|
||||||
local lStationType = ""
|
local lStationType = " "
|
||||||
local lTargetingPower = mainPanelDevice:get_argument_value(433)
|
local lTargetingPower = mainPanelDevice:get_argument_value(433)
|
||||||
local lTrigger = mainPanelDevice:get_argument_value(615)
|
local lTrigger = mainPanelDevice:get_argument_value(615)
|
||||||
if lTrigger == 0 then
|
if lTrigger == 0 then
|
||||||
@@ -698,26 +697,6 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local lEkranSendString = ""
|
|
||||||
local lEkranText = lEKRAN:get_actual_text_frame()
|
|
||||||
if lEkranText ~= "" then
|
|
||||||
lEkranSendString = string.sub(lEkranText,1,8).."\n"..string.sub(lEkranText,12,19).."\n"..string.sub(lEkranText,23,30).."\n"..string.sub(lEkranText,34,41)
|
|
||||||
end
|
|
||||||
|
|
||||||
local lFAILlight = "" -- FAILURE
|
|
||||||
local lMEMORYlight = "" -- MEMORY
|
|
||||||
local lTURNlight = "" -- TURN
|
|
||||||
if lEkranSendString ~= "" then
|
|
||||||
lFAILlight = "FAILURE"
|
|
||||||
end
|
|
||||||
-- DisplayWindow (main message)
|
|
||||||
-- FAILlight (failure text)
|
|
||||||
-- MEMORYlight (memmory text)
|
|
||||||
-- TURNlight (turn text)
|
|
||||||
--ExportScript.Tools.SendData(2001, string.format("%s", lEkranSendString))
|
|
||||||
--ExportScript.Tools.SendData(2002, string.format("%s", lFAILlight))
|
|
||||||
--ExportScript.Tools.SendData(2003, string.format("%s", lMEMORYlight))
|
|
||||||
--ExportScript.Tools.SendData(2004, string.format("%s", lTURNlight))
|
|
||||||
-- PUI-800 Weapon panel
|
-- PUI-800 Weapon panel
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
ExportScript.Tools.SendData(2004, string.format("%s", lStationType))
|
ExportScript.Tools.SendData(2004, string.format("%s", lStationType))
|
||||||
@@ -732,11 +711,46 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
|||||||
|
|
||||||
ExportScript.Tools.SendData(2007, string.format("%s", lUV26))
|
ExportScript.Tools.SendData(2007, string.format("%s", lUV26))
|
||||||
|
|
||||||
|
-- EKRAN
|
||||||
|
---------------------------------------------------
|
||||||
|
|
||||||
|
local lEKRAN = GetDevice(10)
|
||||||
|
local lEkranSendString = ""
|
||||||
|
local lEkranText = lEKRAN:get_actual_text_frame()
|
||||||
|
if lEkranText ~= "" then
|
||||||
|
--lEkranSendString = string.sub(lEkranText,1,8).."\n"..string.sub(lEkranText,12,19).."\n"..string.sub(lEkranText,23,30).."\n"..string.sub(lEkranText,34,41)
|
||||||
|
ExportScript.Tools.SendData(2010, string.format("%s", string.sub(lEkranText,1,8)))
|
||||||
|
ExportScript.Tools.SendData(2011, string.format("%s", string.sub(lEkranText,12,19)))
|
||||||
|
ExportScript.Tools.SendData(2012, string.format("%s", string.sub(lEkranText,23,30)))
|
||||||
|
ExportScript.Tools.SendData(2013, string.format("%s", string.sub(lEkranText,34,41)))
|
||||||
|
else
|
||||||
|
ExportScript.Tools.SendData(2010, " ")
|
||||||
|
ExportScript.Tools.SendData(2011, " ")
|
||||||
|
ExportScript.Tools.SendData(2012, " ")
|
||||||
|
ExportScript.Tools.SendData(2013, " ")
|
||||||
|
end
|
||||||
|
|
||||||
|
--[[
|
||||||
|
local lFAILlight = "" -- FAILURE
|
||||||
|
local lMEMORYlight = "" -- MEMORY
|
||||||
|
local lTURNlight = "" -- TURN
|
||||||
|
if lEkranSendString ~= "" then
|
||||||
|
lFAILlight = "FAILURE"
|
||||||
|
end
|
||||||
|
-- DisplayWindow (main message)
|
||||||
|
-- FAILlight (failure text)
|
||||||
|
-- MEMORYlight (memmory text)
|
||||||
|
-- TURNlight (turn text)
|
||||||
|
--ExportScript.Tools.SendData(2001, string.format("%s", lEkranSendString))
|
||||||
|
--ExportScript.Tools.SendData(2002, string.format("%s", lFAILlight))
|
||||||
|
--ExportScript.Tools.SendData(2003, string.format("%s", lMEMORYlight))
|
||||||
|
--ExportScript.Tools.SendData(2004, string.format("%s", lTURNlight))
|
||||||
--ExportScript.Tools.WriteToLog('lEkranSendString: '..ExportScript.Tools.dump(lEkranSendString))
|
--ExportScript.Tools.WriteToLog('lEkranSendString: '..ExportScript.Tools.dump(lEkranSendString))
|
||||||
--ExportScript.Tools.WriteToLog('lFAILlight: '..ExportScript.Tools.dump(lFAILlight))
|
--ExportScript.Tools.WriteToLog('lFAILlight: '..ExportScript.Tools.dump(lFAILlight))
|
||||||
--ExportScript.Tools.WriteToLog('lMEMORYlight: '..ExportScript.Tools.dump(lMEMORYlight))
|
--ExportScript.Tools.WriteToLog('lMEMORYlight: '..ExportScript.Tools.dump(lMEMORYlight))
|
||||||
--ExportScript.Tools.WriteToLog('lTURNlight: '..ExportScript.Tools.dump(lTURNlight))
|
--ExportScript.Tools.WriteToLog('lTURNlight: '..ExportScript.Tools.dump(lTURNlight))
|
||||||
|
]]
|
||||||
|
--[[
|
||||||
--ExportScript.Tools.WriteToLog('EKRAN: '..ExportScript.Tools.dump(list_indication(4)))
|
--ExportScript.Tools.WriteToLog('EKRAN: '..ExportScript.Tools.dump(list_indication(4)))
|
||||||
local lEKRAN = list_indication(4)
|
local lEKRAN = list_indication(4)
|
||||||
lEKRAN = lEKRAN:gsub("-----------------------------------------", "")
|
lEKRAN = lEKRAN:gsub("-----------------------------------------", "")
|
||||||
@@ -783,6 +797,7 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
|||||||
ExportScript.Tools.SendData(2011, string.format("%s", string.sub(lEKRANtxt2,11,19)))
|
ExportScript.Tools.SendData(2011, string.format("%s", string.sub(lEKRANtxt2,11,19)))
|
||||||
ExportScript.Tools.SendData(2012, string.format("%s", string.sub(lEKRANtxt2,21,29)))
|
ExportScript.Tools.SendData(2012, string.format("%s", string.sub(lEKRANtxt2,21,29)))
|
||||||
ExportScript.Tools.SendData(2013, string.format("%s", string.sub(lEKRANtxt2,31,39)))
|
ExportScript.Tools.SendData(2013, string.format("%s", string.sub(lEKRANtxt2,31,39)))
|
||||||
|
]]
|
||||||
|
|
||||||
-- Cockpit Light
|
-- Cockpit Light
|
||||||
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, {300, 299, 298})
|
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, {300, 299, 298})
|
||||||
|
|||||||
Reference in New Issue
Block a user