Use the ExportScript.Tools.negate() function to negate the values.

This commit is contained in:
mcmicha 2017-03-08 23:25:12 +01:00
parent 2e1f8bb4ac
commit d3b9c0405d

View File

@ -292,9 +292,7 @@ function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
]] ]]
-- AGK_47B_sideslip negate -- AGK_47B_sideslip negate
--[8] = "%.4f", -- AGK_47B_sideslip {-1.0, 1.0} --[8] = "%.4f", -- AGK_47B_sideslip {-1.0, 1.0}
local lAGK_47B_sideslip = mainPanelDevice:get_argument_value(8) ExportScript.Tools.SendData(8, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(8)))) -- negate
lAGK_47B_sideslip = (lAGK_47B_sideslip > 0.0 and (0 - lAGK_47B_sideslip) or (lAGK_47B_sideslip - lAGK_47B_sideslip - lAGK_47B_sideslip)) -- negate
ExportScript.Tools.SendData(8, string.format("%.4f", lAGK_47B_sideslip)) -- AGK_47B_sideslip
end end
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice) function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)