-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDCS.F-16C_50.hif.lua
31 lines (28 loc) · 1.32 KB
/
DCS.F-16C_50.hif.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
-- Helios functions for F-16C_50 1.6.609.2
--[[
function driver.processHighImportance(mainPanelDevice)
-- called at configured update rate
-- example for combining/processing arguments:
helios.send(2001, string.format(
"%0.4f;%0.4f;%0.4f",
mainPanelDevice:get_argument_value(220),
mainPanelDevice:get_argument_value(219),
mainPanelDevice:get_argument_value(218)
)
)
-- example for structured indications data:
local li = helios.parseIndication(1)
if li then
helios.send(2002, string.format("%s", helios.ensureString(li.someNamedField1)))
helios.send(2003, string.format("%s", helios.ensureString(li.someNamedField2)))
end
end
]]
function driver.processLowImportance(mainPanelDevice) --luacheck: no unused args
-- same things as processHighImportance can be done here, called a few times per second at most
-- 184 and 185 are required for multiple interface items, so they are sent under alias id's
helios.send(2184, string.format("%1d", mainPanelDevice:get_argument_value(184)))
helios.send(2185, string.format("%1d", mainPanelDevice:get_argument_value(185)))
helios.send(3184, string.format("%1d", mainPanelDevice:get_argument_value(184)))
helios.send(3185, string.format("%1d", mainPanelDevice:get_argument_value(185)))
end