From 0e0606645384d6b3e34140dfe397fa12d1e49e88 Mon Sep 17 00:00:00 2001 From: Bailey Date: Fri, 8 Oct 2021 14:25:15 +0900 Subject: [PATCH] added example for arrow output and comm1/comm2 freq output - Arrow is In reference to the standby radio, but using the stick visibility as the example. see wiki ID 2000. - Comm freq output is currently unrounded, in progress. see wiki. --- .../DCS-ExportScript/ExportsModules/JF-17.lua | 38 ++++++++++++++++--- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/Scripts/DCS-ExportScript/ExportsModules/JF-17.lua b/Scripts/DCS-ExportScript/ExportsModules/JF-17.lua index 53af337..7edcab5 100644 --- a/Scripts/DCS-ExportScript/ExportsModules/JF-17.lua +++ b/Scripts/DCS-ExportScript/ExportsModules/JF-17.lua @@ -445,21 +445,47 @@ ExportScript.ConfigArguments = } function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice) end + function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice) end + function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice) +ExportScript.arrowExample(mainPanelDevice) ExportScript.RadioTile(mainPanelDevice) end + function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice) end -function ExportScript.RadioTile(mainPanelDevice) --https://streamable.com/nnjgpt +---------------------- +-- Custom Functions -- +---------------------- - local radio1 = (GetDevice(25):get_frequency())/1000000 --left radio freq unrounded - local radio2 = (GetDevice(26):get_frequency())/1000000 --right radio freq unrounded +function ExportScript.arrowExample(mainPanelDevice) + + local stickShowHide = mainPanelDevice:get_argument_value(970)-- Stick Hidden argument + local stickStatus + + if stickShowHide >= 0.5 then + stickStatus = "↑Up" -- stick is visible + else + stickStatus = "↓Down" + end + + ExportScript.Tools.SendData(2000, stickStatus) +end + + +function ExportScript.RadioTile(mainPanelDevice) + + local radio1 = (GetDevice(25):get_frequency())/1000000 --left radio freq unrounded + local radio2 = (GetDevice(26):get_frequency())/1000000 --right radio freq unrounded - ExportScript.Tools.SendData(3001, radio1) - ExportScript.Tools.SendData(3002, radio2) -end \ No newline at end of file + ExportScript.Tools.SendData(2001, radio1) --results in "108.000568" for channel 1 + ExportScript.Tools.SendData(2002, radio2) --results in "108.500744" for channel 2 +end +----------------------- +-- General Functions -- +----------------------- \ No newline at end of file