mirror of
https://github.com/weyne85/DCS-ExportScripts.git
synced 2025-10-29 16:58:18 +00:00
feat(F-5E): add flap position indicator string export
This commit is contained in:
parent
a438c73a65
commit
9c62d73acc
@ -527,6 +527,7 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
ExportScript.FuelQuantityIndicator(mainPanelDevice) -- Fuel Quantity Indicator (Dual)
|
||||
ExportScript.UhfRadioKnobs(mainPanelDevice) -- AN/ARC-164 UHF
|
||||
ExportScript.RWRControlPanel(mainPanelDevice)
|
||||
ExportScript.flapPositionIndicator(mainPanelDevice)
|
||||
|
||||
if LoIsObjectExportAllowed() then -- returns true if world objects data is available
|
||||
if LoIsOwnshipExportAllowed() then -- returns true if ownship data is available
|
||||
@ -1390,6 +1391,19 @@ function getRWRButtonLights(mainPanelDevice, first_id, second_id)
|
||||
return first_label.."\n\n\n"..second_label
|
||||
end
|
||||
|
||||
function ExportScript.flapPositionIndicator(mainPanelDevice)
|
||||
local flapIndicatorPositions = {
|
||||
[0.1] = "UP",
|
||||
[0.2] = "AUTO",
|
||||
[0.3] = "FIXED",
|
||||
[0.4] = "FULL"
|
||||
}
|
||||
local currentPos = mainPanelDevice:get_argument_value(51)
|
||||
currentPos = math.floor(currentPos * 10) / 10 -- Cut off excess decimal digits
|
||||
local indicatorText = flapIndicatorPositions[currentPos] or "▄▀▄▀\n▄▀▄▀"
|
||||
ExportScript.Tools.SendData(4010, indicatorText)
|
||||
end
|
||||
|
||||
----------------------
|
||||
-- Helper Functions --
|
||||
----------------------
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user