mirror of
https://github.com/weyne85/DCS-ExportScripts.git
synced 2025-10-29 16:58:18 +00:00
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.
This commit is contained in:
parent
9e2342ca73
commit
0e06066453
@ -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
|
||||
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 --
|
||||
-----------------------
|
||||
Loading…
x
Reference in New Issue
Block a user