Merge pull request #15 from ExoLightFR/mirage-2000

M-2000C: Add StreamDeck profile & improve Lua
This commit is contained in:
Bailey 2024-01-20 23:49:45 +09:00 committed by GitHub
commit 1e931bf195
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
45 changed files with 40 additions and 1 deletions

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1010 B

Binary file not shown.