Merge pull request #17 from ExoLightFR/Tiger
Add F-5E profile & improve Lua exports
@ -526,6 +526,9 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
ExportScript.TacanRadio(mainPanelDevice) -- TACAN Channel
|
||||
ExportScript.FuelQuantityIndicator(mainPanelDevice) -- Fuel Quantity Indicator (Dual)
|
||||
ExportScript.UhfRadioKnobs(mainPanelDevice) -- AN/ARC-164 UHF
|
||||
ExportScript.RWRControlPanel(mainPanelDevice)
|
||||
ExportScript.flapPositionIndicator(mainPanelDevice)
|
||||
ExportScript.pitchTrimPosition(mainPanelDevice)
|
||||
|
||||
if LoIsObjectExportAllowed() then -- returns true if world objects data is available
|
||||
if LoIsOwnshipExportAllowed() then -- returns true if ownship data is available
|
||||
@ -1348,6 +1351,67 @@ function ExportScript.FlowBlinker(mainPanelDevice)
|
||||
ExportScript.Tools.SendData(9000, blink)
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.RWRControlPanel(mainPanelDevice)
|
||||
-- 4003 & 4008 are reserved for logical alignment. LAUNCH & ACT/PWR lights INOP.
|
||||
ExportScript.Tools.SendData(4000, getRWRButtonLights(mainPanelDevice, 552, 553))
|
||||
ExportScript.Tools.SendData(4001, getRWRButtonLights(mainPanelDevice, 555))
|
||||
ExportScript.Tools.SendData(4002, getRWRButtonLights(mainPanelDevice, 557, 558))
|
||||
ExportScript.Tools.SendData(4004, getRWRButtonLights(mainPanelDevice, 562, 563))
|
||||
|
||||
ExportScript.Tools.SendData(4005, getRWRButtonLights(mainPanelDevice, 565, 566))
|
||||
ExportScript.Tools.SendData(4006, getRWRButtonLights(mainPanelDevice, 568, 569))
|
||||
ExportScript.Tools.SendData(4007, getRWRButtonLights(mainPanelDevice, 571, 572))
|
||||
local pwr_on = mainPanelDevice:get_argument_value(576) > 0.0
|
||||
ExportScript.Tools.SendData(4009, pwr_on and "SYSTEM\n\n\nPOWER" or "")
|
||||
end
|
||||
|
||||
function getRWRButtonLights(mainPanelDevice, first_id, second_id)
|
||||
-- Associate argument IDs with their text representation, which
|
||||
-- will be returned as a string for StreamDeck
|
||||
local labels_map = {
|
||||
[552] = "PRIORITY",
|
||||
[553] = "OPEN",
|
||||
[555] = "█ S █",
|
||||
[557] = "█ ◆︎ █",
|
||||
[558] = "█ H █",
|
||||
[562] = "LOW",
|
||||
[563] = "ALT",
|
||||
[565] = "TGT SEP",
|
||||
[566] = "TGT SEP",
|
||||
[568] = "ON",
|
||||
[569] = "SYS TEST",
|
||||
[571] = "█ U █",
|
||||
[572] = "UNKNOWN",
|
||||
}
|
||||
local first_on = mainPanelDevice:get_argument_value(first_id) > 0.0
|
||||
local second_on = mainPanelDevice:get_argument_value(second_id) > 0.0
|
||||
local first_label = first_on and labels_map[first_id] or " "
|
||||
local second_label = second_on and labels_map[second_id] or " "
|
||||
|
||||
return first_label.."\n\n\n"..second_label
|
||||
end
|
||||
|
||||
function ExportScript.flapPositionIndicator(mainPanelDevice)
|
||||
local flapIndicatorPositions = {
|
||||
[0.1] = "UP",
|
||||
[0.2] = "AUTO",
|
||||
[0.3] = "FXD",
|
||||
[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 ""
|
||||
ExportScript.Tools.SendData(4010, indicatorText)
|
||||
ExportScript.Tools.SendData(4011, string.len(indicatorText)) -- If != 0, flaps in transition
|
||||
end
|
||||
|
||||
function ExportScript.pitchTrimPosition(mainPanelDevice)
|
||||
local trimValue = mainPanelDevice:get_argument_value(52)
|
||||
trimValue = math.floor(trimValue * 100) / 10
|
||||
ExportScript.Tools.SendData(4012, string.format("%+.1f", trimValue))
|
||||
end
|
||||
|
||||
----------------------
|
||||
-- Helper Functions --
|
||||
----------------------
|
||||
|
||||
BIN
docu/Pics/F-5E/Exo's profile/F-5E profile demo.png
Normal file
|
After Width: | Height: | Size: 288 KiB |
1
docu/Pics/F-5E/Exo's profile/README.txt
Normal file
@ -0,0 +1 @@
|
||||
To get this profile, install Exo's F-5E StreamDeck profile located in "docu\StreamDeck Examples".
|
||||
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E RWR ACT_PWR.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E RWR T.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E RWR altitude.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E RWR button.psd
Normal file
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E RWR handoff.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E RWR launch.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E RWR mode.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E RWR power.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E RWR search.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E RWR ship.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E RWR sys test.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E Weapon Selectors.psd
Normal file
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E drag chute CLOSE.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E drag chute OPEN.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E drag chute.psd
Normal file
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E flaps blank.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E flaps indicator.psd
Normal file
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E flaps transition.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E gear silence.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E station 1 OFF.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E station 1 ON.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E station 2 OFF.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E station 2 ON.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E station 3 OFF.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E station 3 ON.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E station 4 OFF.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E station 4 ON.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E station 5 OFF.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E station 5 ON.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E station 6 OFF.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E station 6 ON.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E station 7 OFF.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E station 7 ON.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E trim indicator.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
docu/Pics/F-5E/Exo's profile/icons/F-5E trim indicator.psd
Normal file
BIN
docu/Pics/F-5E/Exo's profile/icons/RWR icon.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |