Use new ExportScript.ProcessIkarusDCSConfigLowImportance().

This commit is contained in:
mcmicha 2016-03-16 00:56:45 +01:00
parent 6644993e64
commit 06b33c4ed2
5 changed files with 88 additions and 64 deletions

View File

@ -69,11 +69,15 @@ ExportScript.ConfigEveryFrameArguments =
[715] = "%.4f", -- Standby Attitude Indicator manual pitch adjustment [715] = "%.4f", -- Standby Attitude Indicator manual pitch adjustment
-- Engine Gauges -- Engine Gauges
[70] = "%.4f", -- Left Engine Temperature [70] = "%.4f", -- Left Engine Temperature
[71] = "%.4f", -- Left Engine TemperatureUnits
[73] = "%.4f", -- Right Engine Temperature [73] = "%.4f", -- Right Engine Temperature
[74] = "%.4f", -- Right Engine TemperatureUnits
[76] = "%.4f", -- EngineLeftFanSpeed [76] = "%.4f", -- EngineLeftFanSpeed
[77] = "%.4f", -- EngineRightFanSpeed [77] = "%.4f", -- EngineRightFanSpeed
[78] = "%.4f", -- EngineLeftCoreSpeedTenth [78] = "%.4f", -- EngineLeftCoreSpeedTenth
[79] = "%.4f", -- EngineLeftCoreSpeedUnits
[80] = "%.4f", -- EngineRightCoreSpeedTenth [80] = "%.4f", -- EngineRightCoreSpeedTenth
[81] = "%.4f", -- EngineRightCoreSpeedUnits
[82] = "%.4f", -- Left Engine Oil Pressure [82] = "%.4f", -- Left Engine Oil Pressure
[83] = "%.4f", -- Right Engine Oil Pressure [83] = "%.4f", -- Right Engine Oil Pressure
[84] = "%.4f", -- EngineLeftFuelFlow [84] = "%.4f", -- EngineLeftFuelFlow
@ -765,6 +769,10 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
ExportScript.Tools.SendData(2006, "") -- txt_JMR ExportScript.Tools.SendData(2006, "") -- txt_JMR
ExportScript.Tools.SendData(2007, "") -- txt_MWS ExportScript.Tools.SendData(2007, "") -- txt_MWS
end end
-- Cockpit Light
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, {290,292,293})
-- Engine Instruments Lights, Flight Instruments Lights, Auxiliary Instruments Lights
end end
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice) function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)

View File

@ -773,6 +773,10 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
lEkranSendString = string.sub(lEKRANtxt2,1,9).."\n"..string.sub(lEKRANtxt2,11,19).."\n"..string.sub(lEKRANtxt2,21,29).."\n"..string.sub(lEKRANtxt2,31,39) lEkranSendString = string.sub(lEKRANtxt2,1,9).."\n"..string.sub(lEKRANtxt2,11,19).."\n"..string.sub(lEKRANtxt2,21,29).."\n"..string.sub(lEKRANtxt2,31,39)
ExportScript.Tools.SendData(2001, string.format("%s", lEkranSendString)) ExportScript.Tools.SendData(2001, string.format("%s", lEkranSendString))
ExportScript.Tools.SendData(2004, string.format("%s", lEKRANtxtqueue)) ExportScript.Tools.SendData(2004, string.format("%s", lEKRANtxtqueue))
-- Cockpit Light
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, {300, 299, 298})
-- Lighting cockpit panel switch, Lighting night vision cockpit switch, Lighting ADI and SAI switch
end end
-- Pointed to by ProcessDACLowImportance, if the player aircraft is a Ka-50 -- Pointed to by ProcessDACLowImportance, if the player aircraft is a Ka-50
@ -853,7 +857,6 @@ function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
ExportScript.Tools.SendDataDAC("2007", string.format("%s", lUV26)) ExportScript.Tools.SendDataDAC("2007", string.format("%s", lUV26))
local lPVI800 = list_indication(5) local lPVI800 = list_indication(5)
--[[ --[[
txt_VIT Inhalt obere Zeile txt_VIT Inhalt obere Zeile
@ -976,55 +979,6 @@ function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
ExportScript.Tools.SendDataDAC("2008", string.format("%s", ltxt_upper_row)) ExportScript.Tools.SendDataDAC("2008", string.format("%s", ltxt_upper_row))
ExportScript.Tools.SendDataDAC("2009", string.format("%s", ltxt_lower_row)) ExportScript.Tools.SendDataDAC("2009", string.format("%s", ltxt_lower_row))
--[[
--ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
local ltmp1 = 0
for ltmp2 = 1, 14, 1 do
ltmp1 = list_indication(ltmp2)
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
--ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
end
]]
end
-----------------------------
-- HIGH IMPORTANCE EXPORTS --
-- done every export event --
-----------------------------
-- Pointed to by ProcessIkarusDCSHighImportance
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
--[[
every frame export to Ikarus
Example from A-10C
Get Radio Frequencies
get data from device
local lUHFRadio = GetDevice(54)
ExportScript.Tools.SendData("ExportID", "Format")
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) <- special function for get frequency data
]]
ExportScript.Tools.SendData(44, string.format("%.1f", mainPanelDevice:get_argument_value(44))) -- lamp_MasterWarning {0.0,0.3}
ExportScript.Tools.SendData(46, string.format("%.1f", mainPanelDevice:get_argument_value(46))) -- lamp_RotorRPM {0.0,0.1}
end
-- Pointed to by ProcessDACHighImportance, if the player aircraft is a Ka-50
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
--[[
every frame export to hardware
Example from A-10C
Get Radio Frequencies
get data from device
local UHF_RADIO = GetDevice(54)
ExportScript.Tools.SendDataDAC("ExportID", "Format")
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000), 2) -- export to Hardware '2' Config
]]
ExportScript.Tools.SendDataDAC("44", mainPanelDevice:get_argument_value(44) > 0.0 and 1 or 0) -- lamp_MasterWarning {0.0,0.3}
ExportScript.Tools.SendDataDAC("46", mainPanelDevice:get_argument_value(46) > 0.0 and 1 or 0) -- lamp_RotorRPM {0.0,0.1}
-- generic Radio display and frequency rotarys -- generic Radio display and frequency rotarys
------------------------------------------------- -------------------------------------------------
-- genericRadioConf -- genericRadioConf
@ -1103,6 +1057,55 @@ function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
ExportScript.genericRadio(nil, nil) ExportScript.genericRadio(nil, nil)
--[[
--ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
local ltmp1 = 0
for ltmp2 = 1, 14, 1 do
ltmp1 = list_indication(ltmp2)
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
--ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
end
]]
end
-----------------------------
-- HIGH IMPORTANCE EXPORTS --
-- done every export event --
-----------------------------
-- Pointed to by ProcessIkarusDCSHighImportance
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
--[[
every frame export to Ikarus
Example from A-10C
Get Radio Frequencies
get data from device
local lUHFRadio = GetDevice(54)
ExportScript.Tools.SendData("ExportID", "Format")
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) <- special function for get frequency data
]]
ExportScript.Tools.SendData(44, string.format("%.1f", mainPanelDevice:get_argument_value(44))) -- lamp_MasterWarning {0.0,0.3}
ExportScript.Tools.SendData(46, string.format("%.1f", mainPanelDevice:get_argument_value(46))) -- lamp_RotorRPM {0.0,0.1}
end
-- Pointed to by ProcessDACHighImportance, if the player aircraft is a Ka-50
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
--[[
every frame export to hardware
Example from A-10C
Get Radio Frequencies
get data from device
local UHF_RADIO = GetDevice(54)
ExportScript.Tools.SendDataDAC("ExportID", "Format")
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000), 2) -- export to Hardware '2' Config
]]
ExportScript.Tools.SendDataDAC("44", mainPanelDevice:get_argument_value(44) > 0.0 and 1 or 0) -- lamp_MasterWarning {0.0,0.3}
ExportScript.Tools.SendDataDAC("46", mainPanelDevice:get_argument_value(46) > 0.0 and 1 or 0) -- lamp_RotorRPM {0.0,0.1}
--[[ --[[
-- ENGINE_INTERFACE -- ENGINE_INTERFACE
local lENGINE_INTERFACE = GetDevice(4) local lENGINE_INTERFACE = GetDevice(4)

View File

@ -1019,6 +1019,11 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
ExportScript.Tools.SendData("ExportID", "Format") ExportScript.Tools.SendData("ExportID", "Format")
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) <- special function for get frequency data ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) <- special function for get frequency data
]] ]]
-- Cockpit Light
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, {280, 281, 491, 492, 894, 895, 914})
-- Lh RedLights Brightness Rst gr.1, Lh RedLights Brightness Rst gr.2, Rh RedLights Brightness Rst gr.1, Rh RedLights Brightness Rst gr.2, Central RedLights Brightness Rst gr.1, Central RedLights Brightness Rst gr.2, 5.5V Lights Brightness Rheostat
--[[ --[[
-- AGB_3K_LEFT -- AGB_3K_LEFT
local lAGB_3K_LEFT = GetDevice(6) local lAGB_3K_LEFT = GetDevice(6)

View File

@ -322,6 +322,10 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
ExportScript.Tools.SendData("ExportID", "Format") ExportScript.Tools.SendData("ExportID", "Format")
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) <- special function for get frequency data ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) <- special function for get frequency data
]] ]]
-- Cockpit Light
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, 220)
-- Panels Light Rheostat
end end

View File

@ -439,7 +439,7 @@ ExportScript.ConfigArguments =
[201] = "%1d", -- Search Light [201] = "%1d", -- Search Light
[205] = "%1d", -- Landing Light Ctrl [205] = "%1d", -- Landing Light Ctrl
-- Light System -- Light System
[230] = "%.4f", -- "Overhead Console Panel Lights Brightness Rheostat, Axis [230] = "%.4f", -- Overhead Console Panel Lights Brightness Rheostat, Axis
[231] = "%.4f", -- Pedestal Lights Brightness Rheostat, Axis [231] = "%.4f", -- Pedestal Lights Brightness Rheostat, Axis
[232] = "%.4f", -- Secondary Instrument Lights Brightness Rheostat, Axis [232] = "%.4f", -- Secondary Instrument Lights Brightness Rheostat, Axis
[233] = "%.4f", -- Engine Instrument Lights Brightness Rheostat, Axis [233] = "%.4f", -- Engine Instrument Lights Brightness Rheostat, Axis
@ -546,6 +546,10 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
ExportScript.Tools.SendData("ExportID", "Format") ExportScript.Tools.SendData("ExportID", "Format")
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) <- special function for get frequency data ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) <- special function for get frequency data
]] ]]
-- Cockpit Light
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, {230, 231, 232, 233, 234, 235})
-- Overhead Console Panel Lights Brightness Rheostat, Pedestal Lights Brightness Rheostat, Secondary Instrument Lights Brightness Rheostat, Engine Instrument Lights Brightness Rheostat, Copilot Instrument Lights Brightness Rheostat, Pilot Instrument Lights Brightness Rheostat, Axis
end end
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice) function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)