From 674913a0b8e8988905ef4f00dc616476c2caef37 Mon Sep 17 00:00:00 2001 From: McMicha Date: Thu, 27 Feb 2020 23:30:53 +0100 Subject: [PATCH] fix last erros L-39C.lua/L-39ZA.lua SA342L.lua/SA342M.lua/SA342Mistral.lua --- Scripts/DCS-ExportScript/ExportsModules/L-39C.lua | 8 ++++---- Scripts/DCS-ExportScript/ExportsModules/L-39ZA.lua | 8 ++++---- Scripts/DCS-ExportScript/ExportsModules/SA342L.lua | 12 +++++++++++- Scripts/DCS-ExportScript/ExportsModules/SA342M.lua | 12 +++++++++++- .../DCS-ExportScript/ExportsModules/SA342Mistral.lua | 12 +++++++++++- 5 files changed, 41 insertions(+), 11 deletions(-) diff --git a/Scripts/DCS-ExportScript/ExportsModules/L-39C.lua b/Scripts/DCS-ExportScript/ExportsModules/L-39C.lua index 44d9634..47e58e9 100644 --- a/Scripts/DCS-ExportScript/ExportsModules/L-39C.lua +++ b/Scripts/DCS-ExportScript/ExportsModules/L-39C.lua @@ -17,8 +17,8 @@ ExportScript.ConfigEveryFrameArguments = -- Radar altimeter RV-5 [58] = "%.4f", -- RV-5 RALT {0.0, 0.086, 0.439, 0.878, 0.955}{0.0, 20.0, 100.0, 700.0, 800.0} [59] = "%.4f", -- RV-5 DangerRALT index {0.0, 0.094, 0.48, 0.998}{0.0, 20.0, 100.0, 700.0} - [63] = "%.f", -- RV-5 DangerRALT lamp [62] = "%.4f", -- RV-5 warning flag + [63] = "%.f", -- RV-5 DangerRALT lamp -- Variometer [74] = "%.4f", -- Variometer {-1.0, -0.875, -0.775, -0.44, 0.0, 0.44, 0.775, 0.875, 1.0}{-80.0, -50.0, -20.0, -10.0, 0.0, 10.0, 20.0, 50.0, 80.0} [76] = "%.4f", -- Variometer sideslip {-1.0, 1.0} @@ -185,8 +185,8 @@ ExportScript.ConfigEveryFrameArguments = -- Radar altimeter RV-5 [396] = "%.4f", -- Backseat - RV-5 RALT {0.0, 0.086, 0.439, 0.878, 0.955}{0.0, 20.0, 100.0, 700.0, 800.0} [397] = "%.4f", -- Backseat - RV-5 DangerRALT index {0.0, 0.094, 0.48, 0.998}{0.0, 20.0, 100.0, 700.0} - [401] = "%.f", -- Backseat - RV-5 DangerRALT lamp [400] = "%.4f", -- Backseat - RV-5 warning flag + [401] = "%.f", -- Backseat - RV-5 DangerRALT lamp -- Variometer [416] = "%.4f", -- Backseat - Variometer {-1.0, -0.875, -0.775, -0.44, 0.0, 0.44, 0.775, 0.875, 1.0}{-80.0, -50.0, -20.0, -10.0, 0.0, 10.0, 20.0, 50.0, 80.0} [418] = "%.4f", -- Backseat - Variometer sideslip {-1.0, 1.0} @@ -202,8 +202,8 @@ ExportScript.ConfigEveryFrameArguments = [369] = "%.4f", -- Backseat - KPP SDU Roll {-1.0, 1.0} [370] = "%.4f", -- Backseat - KPP SDU Pitch {-1.0, 1.0} -- NPP HSI - [378] = "%.4f", -- Backseat - HSI2 heading {1.0, 0.0}{0.0, math.pi * 2.0} - [379] = "%.4f", -- Backseat - HSI2 commanded course needle {1.0, 0.0}{0.0, math.pi * 2.0} + --[378] = "%.4f", -- Backseat - HSI2 heading {1.0, 0.0}{0.0, math.pi * 2.0} + --[379] = "%.4f", -- Backseat - HSI2 commanded course needle {1.0, 0.0}{0.0, math.pi * 2.0} [380] = "%.4f", -- Backseat - HSI2 bearing needle {1.0, 0.0}{0.0, math.pi * 2.0} [384] = "%.4f", -- Backseat - HSI2 Course Deviation Bar {-0.8, 0.8}{-1.0, 1.0} [382] = "%.4f", -- Backseat - HSI2 Alt Deviation Bar {-0.8, 0.8}{-1.0, 1.0} diff --git a/Scripts/DCS-ExportScript/ExportsModules/L-39ZA.lua b/Scripts/DCS-ExportScript/ExportsModules/L-39ZA.lua index cddbaeb..0196242 100644 --- a/Scripts/DCS-ExportScript/ExportsModules/L-39ZA.lua +++ b/Scripts/DCS-ExportScript/ExportsModules/L-39ZA.lua @@ -17,8 +17,8 @@ ExportScript.ConfigEveryFrameArguments = -- Radar altimeter RV-5 [58] = "%.4f", -- RV-5 RALT {0.0, 0.086, 0.439, 0.878, 0.955}{0.0, 20.0, 100.0, 700.0, 800.0} [59] = "%.4f", -- RV-5 DangerRALT index {0.0, 0.094, 0.48, 0.998}{0.0, 20.0, 100.0, 700.0} - [63] = "%.f", -- RV-5 DangerRALT lamp [62] = "%.4f", -- RV-5 warning flag + [63] = "%.f", -- RV-5 DangerRALT lamp -- Variometer [74] = "%.4f", -- Variometer {-1.0, -0.875, -0.775, -0.44, 0.0, 0.44, 0.775, 0.875, 1.0}{-80.0, -50.0, -20.0, -10.0, 0.0, 10.0, 20.0, 50.0, 80.0} [76] = "%.4f", -- Variometer sideslip {-1.0, 1.0} @@ -186,8 +186,8 @@ ExportScript.ConfigEveryFrameArguments = -- Radar altimeter RV-5 [396] = "%.4f", -- Backseat - RV-5 RALT {0.0, 0.086, 0.439, 0.878, 0.955}{0.0, 20.0, 100.0, 700.0, 800.0} [397] = "%.4f", -- Backseat - RV-5 DangerRALT index {0.0, 0.094, 0.48, 0.998}{0.0, 20.0, 100.0, 700.0} - [401] = "%.f", -- Backseat - RV-5 DangerRALT lamp [400] = "%.4f", -- Backseat - RV-5 warning flag + [401] = "%.f", -- Backseat - RV-5 DangerRALT lamp -- Variometer [416] = "%.4f", -- Backseat - Variometer {-1.0, -0.875, -0.775, -0.44, 0.0, 0.44, 0.775, 0.875, 1.0}{-80.0, -50.0, -20.0, -10.0, 0.0, 10.0, 20.0, 50.0, 80.0} [418] = "%.4f", -- Backseat - Variometer sideslip {-1.0, 1.0} @@ -203,8 +203,8 @@ ExportScript.ConfigEveryFrameArguments = [369] = "%.4f", -- Backseat - KPP SDU Roll {-1.0, 1.0} [370] = "%.4f", -- Backseat - KPP SDU Pitch {-1.0, 1.0} -- NPP HSI - [378] = "%.4f", -- Backseat - HSI2 heading {1.0, 0.0}{0.0, math.pi * 2.0} - [379] = "%.4f", -- Backseat - HSI2 commanded course needle {1.0, 0.0}{0.0, math.pi * 2.0} + --[378] = "%.4f", -- Backseat - HSI2 heading {1.0, 0.0}{0.0, math.pi * 2.0} + --[379] = "%.4f", -- Backseat - HSI2 commanded course needle {1.0, 0.0}{0.0, math.pi * 2.0} [380] = "%.4f", -- Backseat - HSI2 bearing needle {1.0, 0.0}{0.0, math.pi * 2.0} [384] = "%.4f", -- Backseat - HSI2 Course Deviation Bar {-0.8, 0.8}{-1.0, 1.0} [382] = "%.4f", -- Backseat - HSI2 Alt Deviation Bar {-0.8, 0.8}{-1.0, 1.0} diff --git a/Scripts/DCS-ExportScript/ExportsModules/SA342L.lua b/Scripts/DCS-ExportScript/ExportsModules/SA342L.lua index af8f315..07990a1 100644 --- a/Scripts/DCS-ExportScript/ExportsModules/SA342L.lua +++ b/Scripts/DCS-ExportScript/ExportsModules/SA342L.lua @@ -47,7 +47,7 @@ ExportScript.ConfigEveryFrameArguments = [165] = "%0.1f", -- ADF_nav2_dec {0,1} 000.X khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0} -- ADF Gauge [113] = "%.4f", -- ADF_Fond Compass rose {0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360}{0.0,0.028,0.055,0.084,0.111,0.138,0.166,0.194,0.222,0.249,0.2775,0.305,0.332,0.36,0.388,0.415,0.4434,0.47,0.498,0.526,0.555,0.583,0.611,0.638,0.6665,0.694,0.722,0.75,0.776,0.805,0.833,0.861,0.8885,0.917,0.944,0.972,1.0} - [102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0} + --[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0} [103] = "%.4f", -- ADF_Aiguille_fine Heading Needle fine {-360.0,0.0,360.0}{-1.0,0.0,1.0} [107] = "%.1f", -- ADF_FlagCAP {0,1} [109] = "%.1f", -- ADF_FlagBut {0,1} @@ -401,6 +401,16 @@ function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice) ]] --[97] = "%.f", -- RAltlamp {0,1} ExportScript.Tools.SendData(97, (mainPanelDevice:get_argument_value(97) > 0.009 and 1 or 0)) + + --[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0} + local ADF_Aiguille_large = mainPanelDevice:get_argument_value(102) + if ADF_Aiguille_large ~= 0 then + ADF_Aiguille_large = ADF_Aiguille_large + 0.5 + if ADF_Aiguille_large > 1 then + ADF_Aiguille_large = ADF_Aiguille_large - 1.0 + end + end + ExportScript.Tools.SendData(102, string.format("%.4f", ADF_Aiguille_large)) end function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice) diff --git a/Scripts/DCS-ExportScript/ExportsModules/SA342M.lua b/Scripts/DCS-ExportScript/ExportsModules/SA342M.lua index ecf2bb3..b1f4045 100644 --- a/Scripts/DCS-ExportScript/ExportsModules/SA342M.lua +++ b/Scripts/DCS-ExportScript/ExportsModules/SA342M.lua @@ -47,7 +47,7 @@ ExportScript.ConfigEveryFrameArguments = [165] = "%0.1f", -- ADF_nav2_dec {0,1} 000.X khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0} -- ADF Gauge [113] = "%.4f", -- ADF_Fond Compass rose {0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360}{0.0,0.028,0.055,0.084,0.111,0.138,0.166,0.194,0.222,0.249,0.2775,0.305,0.332,0.36,0.388,0.415,0.4434,0.47,0.498,0.526,0.555,0.583,0.611,0.638,0.6665,0.694,0.722,0.75,0.776,0.805,0.833,0.861,0.8885,0.917,0.944,0.972,1.0} - [102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0} + --[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0} [103] = "%.4f", -- ADF_Aiguille_fine Heading Needle fine {-360.0,0.0,360.0}{-1.0,0.0,1.0} [107] = "%.1f", -- ADF_FlagCAP {0,1} [109] = "%.1f", -- ADF_FlagBut {0,1} @@ -418,6 +418,16 @@ function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice) ]] --[97] = "%.f", -- RAltlamp {0,1} ExportScript.Tools.SendData(97, (mainPanelDevice:get_argument_value(97) > 0.009 and 1 or 0)) + + --[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0} + local ADF_Aiguille_large = mainPanelDevice:get_argument_value(102) + if ADF_Aiguille_large ~= 0 then + ADF_Aiguille_large = ADF_Aiguille_large + 0.5 + if ADF_Aiguille_large > 1 then + ADF_Aiguille_large = ADF_Aiguille_large - 1.0 + end + end + ExportScript.Tools.SendData(102, string.format("%.4f", ADF_Aiguille_large)) end function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice) diff --git a/Scripts/DCS-ExportScript/ExportsModules/SA342Mistral.lua b/Scripts/DCS-ExportScript/ExportsModules/SA342Mistral.lua index 02d61ef..393fc32 100644 --- a/Scripts/DCS-ExportScript/ExportsModules/SA342Mistral.lua +++ b/Scripts/DCS-ExportScript/ExportsModules/SA342Mistral.lua @@ -47,7 +47,7 @@ ExportScript.ConfigEveryFrameArguments = [165] = "%0.1f", -- ADF_nav2_dec {0,1} 000.X khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0} -- ADF Gauge [113] = "%.4f", -- ADF_Fond Compass rose {0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360}{0.0,0.028,0.055,0.084,0.111,0.138,0.166,0.194,0.222,0.249,0.2775,0.305,0.332,0.36,0.388,0.415,0.4434,0.47,0.498,0.526,0.555,0.583,0.611,0.638,0.6665,0.694,0.722,0.75,0.776,0.805,0.833,0.861,0.8885,0.917,0.944,0.972,1.0} - [102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0} + --[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0} [103] = "%.4f", -- ADF_Aiguille_fine Heading Needle fine {-360.0,0.0,360.0}{-1.0,0.0,1.0} [107] = "%.1f", -- ADF_FlagCAP {0,1} [109] = "%.1f", -- ADF_FlagBut {0,1} @@ -406,6 +406,16 @@ function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice) ]] --[97] = "%.f", -- RAltlamp {0,1} ExportScript.Tools.SendData(97, (mainPanelDevice:get_argument_value(97) > 0.009 and 1 or 0)) + + --[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0} + local ADF_Aiguille_large = mainPanelDevice:get_argument_value(102) + if ADF_Aiguille_large ~= 0 then + ADF_Aiguille_large = ADF_Aiguille_large + 0.5 + if ADF_Aiguille_large > 1 then + ADF_Aiguille_large = ADF_Aiguille_large - 1.0 + end + end + ExportScript.Tools.SendData(102, string.format("%.4f", ADF_Aiguille_large)) end function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)