mirror of
https://github.com/weyne85/DCS-ExportScripts.git
synced 2025-10-29 16:58:18 +00:00
Use the ExportScript.Tools.negate() function to negate the values.
This commit is contained in:
parent
6a8da731f4
commit
2e1f8bb4ac
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user