feat(M-2000C): add SD profile & code

This commit is contained in:
ExoLight 2024-01-19 21:54:14 +01:00
parent ca7329ba89
commit e46a45ad59
2 changed files with 40 additions and 1 deletions

View File

@ -50,6 +50,10 @@ ExportScript.ConfigEveryFrameArguments =
[187] = "%.1f", --LED green, ADI [187] = "%.1f", --LED green, ADI
[188] = "%.1f", --LED green, ADI [188] = "%.1f", --LED green, ADI
-- VTB switches
-- TODO: add the rest of them
[216] = "%.1f",
-- RWR Lamps -- RWR Lamps
[229] = "%.1f", --V [229] = "%.1f", --V
[230] = "%.1f", --BR [230] = "%.1f", --BR
@ -701,6 +705,12 @@ ExportScript.ConfigArguments =
[637] = "%.1f", --ECS Temperature Select Knob {-1.0,1.0} in 0.1 steps [637] = "%.1f", --ECS Temperature Select Knob {-1.0,1.0} in 0.1 steps
[638] = "%.1f", --ECS Defog Switch [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)) 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 -- ECM Mode Switch
-- [194] = "%.1f", --ECM Box Mode Switch -- [194] = "%.1f", --ECM Box Mode Switch
local lECM_On = (mainPanelDevice:get_argument_value(194) > 0.0 and true or false) local lECM_On = (mainPanelDevice:get_argument_value(194) > 0.0 and true or false)
@ -1484,4 +1504,23 @@ function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
]] ]]
end 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 -- end script

Binary file not shown.