-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDCS.F-16C_50.hif.lua
More file actions
36 lines (30 loc) · 1.38 KB
/
DCS.F-16C_50.hif.lua
File metadata and controls
36 lines (30 loc) · 1.38 KB
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
32
33
34
35
36
-- Helios functions for F-16C_50
-- version: "1.6.6170.1000",
-- commit: "f771ff19c726dca0343b9865edeec7200755ee15"
function driver.processHighImportance(mainPanelDevice)
-- called at configured update rate
-- Send ADI Ball Values
helios.send(2050, string.format("%0.4f;0.0;%0.4f", mainPanelDevice:get_argument_value(17), mainPanelDevice:get_argument_value(18)))
-- Fuel Total
helios.send(
2180,
string.format(
"%d",
(math.floor(mainPanelDevice:get_argument_value(730)*10)*10000)+ (math.floor(mainPanelDevice:get_argument_value(731) * 10) * 1000) + (math.floor(mainPanelDevice:get_argument_value(732) * 1000))
)
)
-- Fuel Flow
helios.send(
2181,
string.format(
"%d",
math.floor(mainPanelDevice:get_argument_value(88)*10)*10000 + math.floor(mainPanelDevice:get_argument_value(89)*10)*1000 + math.floor(mainPanelDevice:get_argument_value(90)*100)*10
)
)
end
function driver.processLowImportance(mainPanelDevice)
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