Merge pull request #15 from ExoLightFR/mirage-2000
M-2000C: Add StreamDeck profile & improve Lua
@ -50,6 +50,10 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
[187] = "%.1f", --LED green, ADI
|
||||
[188] = "%.1f", --LED green, ADI
|
||||
|
||||
-- VTB switches
|
||||
-- TODO: add the rest of them
|
||||
[216] = "%.1f",
|
||||
|
||||
-- RWR Lamps
|
||||
[229] = "%.1f", --V
|
||||
[230] = "%.1f", --BR
|
||||
@ -701,6 +705,12 @@ ExportScript.ConfigArguments =
|
||||
[637] = "%.1f", --ECS Temperature Select Knob {-1.0,1.0} in 0.1 steps
|
||||
[638] = "%.1f", --ECS Defog Switch
|
||||
|
||||
-- Green radio (V/UHF)
|
||||
[965] = "%.1f", -- CLR/VLD Display
|
||||
[969] = "%.1f", -- CONF Display
|
||||
[972] = "%.1f", -- LED SQL Display
|
||||
[975] = "%.4f", -- LED GR Display
|
||||
[979] = "%.4f", -- 5-20 key
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
@ -754,6 +764,16 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
|
||||
-- Master Caution/Warning. Uses unicode characters to mask relevant part of the icon if it's off.
|
||||
local caution_on = mainPanelDevice:get_argument_value(199) == 1.0
|
||||
local warning_on = mainPanelDevice:get_argument_value(200) == 1.0
|
||||
ExportScript.Tools.SendData(2100, text_for_split_indicator_light(caution_on, warning_on))
|
||||
|
||||
-- Autopilot master lamp. Uses unicode characters to mask relevant part of the icon if it's off.
|
||||
local AP_yellow = mainPanelDevice:get_argument_value(283) == 1.0
|
||||
local AP_green = mainPanelDevice:get_argument_value(284) == 1.0
|
||||
ExportScript.Tools.SendData(2101, text_for_split_indicator_light(AP_yellow, AP_green))
|
||||
|
||||
-- ECM Mode Switch
|
||||
-- [194] = "%.1f", --ECM Box Mode Switch
|
||||
local lECM_On = (mainPanelDevice:get_argument_value(194) > 0.0 and true or false)
|
||||
@ -1145,7 +1165,7 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
local lRetVal = ""
|
||||
if lTmpNumber == 0 then
|
||||
lRetVal = "00"
|
||||
else
|
||||
else
|
||||
lRetVal = ExportScript.Tools.DisplayFormat(tostring(lTmpNumber), 2)
|
||||
end
|
||||
ExportScript.Tools.SendData(2042, lRetVal)
|
||||
@ -1484,4 +1504,23 @@ function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
]]
|
||||
end
|
||||
|
||||
-- Uses unicode characters to mask part of a streamdeck icon with text.
|
||||
-- Make sure that streamdeck text is in Courier New, 9pts, centered.
|
||||
function text_for_split_indicator_light(first_light, second_light)
|
||||
local stringOutput = ""
|
||||
|
||||
if first_light == true then
|
||||
stringOutput = stringOutput .. "\n \n"
|
||||
else
|
||||
stringOutput = stringOutput .. "██████████\n▀▀▀▀▀▀▀▀▀▀\n"
|
||||
end
|
||||
if second_light == true then
|
||||
stringOutput = stringOutput .. " \n \n\n"
|
||||
else
|
||||
stringOutput = stringOutput .. "▄▄▄▄▄▄▄▄▄▄\n██████████\n"
|
||||
end
|
||||
|
||||
return stringOutput
|
||||
end
|
||||
|
||||
-- end script
|
||||
|
||||
BIN
docu/Pics/M-2000C/Overview.png
Normal file
|
After Width: | Height: | Size: 126 KiB |
BIN
docu/Pics/M-2000C/icons/0.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
docu/Pics/M-2000C/icons/1.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
docu/Pics/M-2000C/icons/2.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
docu/Pics/M-2000C/icons/20.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
docu/Pics/M-2000C/icons/3.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
docu/Pics/M-2000C/icons/4.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
docu/Pics/M-2000C/icons/5-20.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
docu/Pics/M-2000C/icons/5.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
docu/Pics/M-2000C/icons/6.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
docu/Pics/M-2000C/icons/7.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
docu/Pics/M-2000C/icons/8.png
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
docu/Pics/M-2000C/icons/9.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
docu/Pics/M-2000C/icons/A off.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
docu/Pics/M-2000C/icons/A on.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
docu/Pics/M-2000C/icons/Boutons radar.psd
Normal file
BIN
docu/Pics/M-2000C/icons/CLR.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
docu/Pics/M-2000C/icons/CONF.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
docu/Pics/M-2000C/icons/DEC off.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
docu/Pics/M-2000C/icons/DEC on.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
docu/Pics/M-2000C/icons/GR.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
docu/Pics/M-2000C/icons/MEM.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
docu/Pics/M-2000C/icons/PCA.psd
Normal file
BIN
docu/Pics/M-2000C/icons/PCA_off.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
docu/Pics/M-2000C/icons/PCA_on.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
docu/Pics/M-2000C/icons/PSIC off.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
docu/Pics/M-2000C/icons/PSIC on.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
docu/Pics/M-2000C/icons/READ.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
docu/Pics/M-2000C/icons/SQL.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
docu/Pics/M-2000C/icons/Switch VTB.psd
Normal file
BIN
docu/Pics/M-2000C/icons/TOD.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
docu/Pics/M-2000C/icons/TONE.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
docu/Pics/M-2000C/icons/VERTE.psd
Normal file
BIN
docu/Pics/M-2000C/icons/VISU_off.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
docu/Pics/M-2000C/icons/VISU_on.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
docu/Pics/M-2000C/icons/VLD.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
docu/Pics/M-2000C/icons/VTB Theta neutral.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
docu/Pics/M-2000C/icons/VTB theta down.png
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
BIN
docu/Pics/M-2000C/icons/Voyant PA.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
docu/Pics/M-2000C/icons/Voyant PA.psd
Normal file
BIN
docu/Pics/M-2000C/icons/Voyant Panne.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
docu/Pics/M-2000C/icons/XFR.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
docu/Pics/M-2000C/icons/empty.png
Normal file
|
After Width: | Height: | Size: 1010 B |