From 2e1f8bb4ac63c67b74789dcc1cc9945dbe9afd65 Mon Sep 17 00:00:00 2001 From: mcmicha Date: Wed, 8 Mar 2017 23:24:37 +0100 Subject: [PATCH] Use the ExportScript.Tools.negate() function to negate the values. --- Scripts/DCS-ExportScript/ExportsModules/Mi-8MT.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Scripts/DCS-ExportScript/ExportsModules/Mi-8MT.lua b/Scripts/DCS-ExportScript/ExportsModules/Mi-8MT.lua index 3395d15..2f15f52 100644 --- a/Scripts/DCS-ExportScript/ExportsModules/Mi-8MT.lua +++ b/Scripts/DCS-ExportScript/ExportsModules/Mi-8MT.lua @@ -1001,13 +1001,9 @@ function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice) --[12] = "%.4f", -- AGB_3K_Left_pitch {1.0, -1.0} --[91] = "%.4f", -- AGB_3K_Right_pitch {1.0, -1.0} - local lPitch = mainPanelDevice:get_argument_value(12) - lPitch = (lPitch > 0.0 and (0 - lPitch) or (lPitch - lPitch - lPitch)) -- negate - ExportScript.Tools.SendData(12, string.format("%.4f", lPitch)) + ExportScript.Tools.SendData(12, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(12)))) -- negate - lPitch = mainPanelDevice:get_argument_value(91) - lPitch = (lPitch > 0.0 and (0 - lPitch) or (lPitch + lPitch + lPitch)) -- negate - ExportScript.Tools.SendData(91, string.format("%.4f", lPitch)) + ExportScript.Tools.SendData(91, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(91)))) -- negate end function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)