feat(F-5): RWR panel for SD, autoformat Lua file
Add RWR control panel code & StreamDeck profile. Add source images.
@ -526,6 +526,7 @@ 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)
|
||||
|
||||
if LoIsObjectExportAllowed() then -- returns true if world objects data is available
|
||||
if LoIsOwnshipExportAllowed() then -- returns true if ownship data is available
|
||||
@ -1348,6 +1349,47 @@ 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
|
||||
|
||||
----------------------
|
||||
-- Helper Functions --
|
||||
----------------------
|
||||
|
||||
BIN
docu/Pics/F-5E/RWR page/Demo.png
Normal file
|
After Width: | Height: | Size: 193 KiB |
2
docu/Pics/F-5E/RWR page/README.txt
Normal file
@ -0,0 +1,2 @@
|
||||
To get this, install the F-5 RWR StreamDeck profile located in "docu\StreamDeck Examples".
|
||||
For the text to work correctly, make sure it is set to Tahoma font, 9pt, horizontally-centered, and green coloured.
|
||||
BIN
docu/Pics/F-5E/RWR page/icons/F-5E RWR ACT_PWR.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
docu/Pics/F-5E/RWR page/icons/F-5E RWR T.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
docu/Pics/F-5E/RWR page/icons/F-5E RWR altitude.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
docu/Pics/F-5E/RWR page/icons/F-5E RWR button.psd
Normal file
BIN
docu/Pics/F-5E/RWR page/icons/F-5E RWR handoff.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
docu/Pics/F-5E/RWR page/icons/F-5E RWR launch.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
docu/Pics/F-5E/RWR page/icons/F-5E RWR mode.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
docu/Pics/F-5E/RWR page/icons/F-5E RWR power.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
docu/Pics/F-5E/RWR page/icons/F-5E RWR search.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
docu/Pics/F-5E/RWR page/icons/F-5E RWR ship.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
docu/Pics/F-5E/RWR page/icons/F-5E RWR sys test.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
docu/Pics/F-5E/RWR page/icons/RWR icon.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |