mirror of
https://github.com/s-d-a/DCS-ExportScripts.git
synced 2026-07-18 14:44:39 +00:00
Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0df634fb4e | |||
| 873ef44acb | |||
| 674913a0b8 | |||
| da2740fb83 | |||
| c7a3949cd9 | |||
| 9c007dd9c4 | |||
| 8c69898662 | |||
| 21a99beebd | |||
| e1a9f574a4 | |||
| e6656b02a2 | |||
| b8ed48b517 | |||
| e398ec8f83 | |||
| 96dbbd34c0 | |||
| acd8897db9 | |||
| e03cc16901 | |||
| e8a206d7a3 | |||
| 0665fc1a9f | |||
| 3ce5c2ab02 | |||
| 382eca5069 | |||
| 673f41b1ed | |||
| 174cd37009 | |||
| ce789cb0a8 | |||
| 6480fbac91 | |||
| a0db32902b | |||
| 4d2ed7e25a | |||
| 439db32160 | |||
| f06d1c491b | |||
| bc127a7f71 | |||
| 7b7e4de96c | |||
| 73bb5bc85d | |||
| e3536fbfa2 |
@@ -10,7 +10,9 @@ Zur Zeit werden folgende Export-Formate unterstützt.
|
||||
Der Export von Daten wird für folgende Module unterstützt:
|
||||
- A-10C
|
||||
- AJS37
|
||||
- AV-8B N/A
|
||||
- Bf-109K-4
|
||||
- F/A-18C Hornet
|
||||
- F-5E-3
|
||||
- F-86F
|
||||
- FW-190D9
|
||||
@@ -19,15 +21,16 @@ Der Export von Daten wird für folgende Module unterstützt:
|
||||
- Mi-8MT
|
||||
- MiG-15bis
|
||||
- MiG-21Bis
|
||||
- P-51D
|
||||
- Mirage 2000
|
||||
- P-51D 25/30-NA
|
||||
- SA342L/M/Mistral
|
||||
- SpitfireLFMkIX
|
||||
- SpitfireLFMkIX/CW
|
||||
- Su-25T
|
||||
- TF-51D
|
||||
- UH-1H
|
||||
- alle Flaming Cliffs Flugzeuge
|
||||
- alle Flaming Cliffs Flugzeuge + J-11A
|
||||
|
||||
Kompatibel zur DCS World 1.5.8 und DCS World 2.5.0
|
||||
Kompatibel zur DCS World 2.5.4 und BETA Version
|
||||
|
||||
# English
|
||||
---
|
||||
@@ -40,7 +43,9 @@ At present the following export formats are supported:
|
||||
Following moduls are supported:
|
||||
- A-10C
|
||||
- AJS37
|
||||
- AV-8B N/A
|
||||
- Bf-109K-4
|
||||
- F/A-18C Hornet
|
||||
- F-5E-3
|
||||
- F-86F
|
||||
- FW-190D9
|
||||
@@ -49,15 +54,16 @@ Following moduls are supported:
|
||||
- Mi-8MT
|
||||
- MiG-15bis
|
||||
- MiG-21Bis
|
||||
- P-51D
|
||||
- Mirage 2000
|
||||
- P-51D 25/30-NA
|
||||
- SA342L/M/Mistral
|
||||
- SpitfireLFMkIX
|
||||
- SpitfireLFMkIX/CW
|
||||
- Su-25T
|
||||
- TF-51D
|
||||
- UH-1H
|
||||
- all Flaming Cliffs aircrafts
|
||||
- all Flaming Cliffs aircrafts + J-11A
|
||||
|
||||
Compatible with DCS World 1.5.8 and DCS World 2.5.0
|
||||
Compatible with DCS World 2.5.4 and BETA version
|
||||
|
||||
# Wiki
|
||||
---
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
-- Ikarus and D.A.C. Export Script
|
||||
-- Version 1.0.2
|
||||
--
|
||||
-- Config File
|
||||
--
|
||||
@@ -7,6 +6,7 @@
|
||||
-- Contact dcs2arcaze.micha@farbpigmente.org
|
||||
|
||||
ExportScript.Config = {}
|
||||
ExportScript.Version.Config = "1.2.1"
|
||||
|
||||
-- Ikarus a Glass Cockpit Software
|
||||
ExportScript.Config.IkarusExport = true -- false for not use
|
||||
@@ -15,7 +15,7 @@ ExportScript.Config.IkarusPort = 1625 -- Port Ikarus (1625)
|
||||
ExportScript.Config.IkarusSeparator = ":"
|
||||
|
||||
-- D.A.C. (DCS Arcaze Connector)
|
||||
ExportScript.Config.DACExport = true -- false for not use
|
||||
ExportScript.Config.DACExport = false -- true for use
|
||||
ExportScript.Config.DAC = {}
|
||||
-- first hardware
|
||||
ExportScript.Config.DAC[1] = {}
|
||||
@@ -38,5 +38,6 @@ ExportScript.Config.ExportLowTickInterval = 0.5 -- export evry 0.5 secounds
|
||||
ExportScript.Config.LogPath = lfs.writedir()..[[Logs\Export.log]]
|
||||
ExportScript.Config.ExportModulePath = lfs.writedir()..[[Scripts\DCS-ExportScript\ExportsModules\]]
|
||||
ExportScript.Config.Debug = false
|
||||
ExportScript.Config.SocketDebug = false
|
||||
ExportScript.Config.FirstNewDataSend = true
|
||||
ExportScript.Config.FirstNewDataSendCount = 5
|
||||
ExportScript.Config.FirstNewDataSendCount = 100
|
||||
@@ -1,12 +1,13 @@
|
||||
-- Ikarus and D.A.C. Export Script
|
||||
-- Version 1.0.1
|
||||
--
|
||||
-- Copyright by Michael aka McMicha 2014 - 2017
|
||||
-- Copyright by Michael aka McMicha 2014 - 2018
|
||||
-- Contact dcs2arcaze.micha@farbpigmente.org
|
||||
|
||||
|
||||
-- Main Table
|
||||
ExportScript = {}
|
||||
ExportScript.Version = {}
|
||||
ExportScript.Version.ExportScript = "1.2.1"
|
||||
-- Simulation id
|
||||
ExportScript.SimID = string.format("%08x*",os.time())
|
||||
|
||||
@@ -54,32 +55,24 @@ ExportScript.FoundNoModul = true
|
||||
function LuaExportStart()
|
||||
-- Works once just before mission start.
|
||||
-- (and before player selects their aircraft, if there is a choice!)
|
||||
|
||||
|
||||
-- 2) Setup udp sockets to talk to GlassCockpit
|
||||
package.path = package.path..";.\\LuaSocket\\?.lua"
|
||||
package.cpath = package.cpath..";.\\LuaSocket\\?.dll"
|
||||
|
||||
ExportScript.socket = require("socket")
|
||||
|
||||
ExportScript.UDPsender = ExportScript.socket.udp()
|
||||
ExportScript.UDPsender:setsockname("*", 0)
|
||||
ExportScript.UDPsender:settimeout(.004) -- set the timeout for reading the socket; 250 fps
|
||||
|
||||
if ExportScript.Config.Listener then
|
||||
ExportScript.UDPListener = ExportScript.socket.udp()
|
||||
ExportScript.UDPListener:setsockname("*", ExportScript.Config.ListenerPort)
|
||||
ExportScript.UDPListener:settimeout(.004) -- set the timeout for reading the socket; 250 fps
|
||||
end
|
||||
|
||||
--local lrename1, lrename2 = os.rename(ExportScript.Config.LogPath, ExportScript.Config.LogPath..".old")
|
||||
ExportScript.logFile = io.open(ExportScript.Config.LogPath, "wa") -- "W+"
|
||||
if ExportScript.logFile then
|
||||
ExportScript.logFile:write('\239\187\191') -- create a UTF-8 BOM
|
||||
ExportScript.logFile:write("ExportScript Version: "..ExportScript.Version.ExportScript.."\r\n")
|
||||
end
|
||||
--if lrenmae1 == nil then
|
||||
-- ExportScript.Tools.WriteToLog("Rename Error: "..lrename2)
|
||||
--end
|
||||
|
||||
ExportScript.Tools.createUDPSender()
|
||||
ExportScript.Tools.createUDPListner()
|
||||
|
||||
ExportScript.AF = {} -- Table for Auxiliary functions
|
||||
|
||||
ExportScript.NoLuaExportBeforeNextFrame = false
|
||||
@@ -92,7 +85,7 @@ function LuaExportStart()
|
||||
end
|
||||
|
||||
function LuaExportBeforeNextFrame()
|
||||
if ExportScript.Config.Debug then
|
||||
--[[ if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.ProcessInput()
|
||||
else
|
||||
ExportScript.coProcessArguments_BeforeNextFrame = coroutine.create(ExportScript.Tools.ProcessInput)
|
||||
@@ -102,7 +95,7 @@ function LuaExportBeforeNextFrame()
|
||||
if ExportScript.NoLuaExportBeforeNextFrame == false then
|
||||
ExportScript.Tools.ProcessOutput()
|
||||
end
|
||||
|
||||
]]
|
||||
-- Chain previously-included export as necessary
|
||||
if PrevExport.LuaExportBeforeNextFrame then
|
||||
PrevExport.LuaExportBeforeNextFrame()
|
||||
@@ -120,6 +113,30 @@ function LuaExportAfterNextFrame()
|
||||
end
|
||||
end
|
||||
|
||||
function LuaExportActivityNextEvent(t)
|
||||
local tNext = t
|
||||
|
||||
-- Put your event code here and increase tNext for the next event
|
||||
-- so this function will be called automatically at your custom
|
||||
-- model times.
|
||||
-- If tNext == t then the activity will be terminated.
|
||||
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.ProcessInput()
|
||||
else
|
||||
ExportScript.coProcessArguments_BeforeNextFrame = coroutine.create(ExportScript.Tools.ProcessInput)
|
||||
coStatus = coroutine.resume(ExportScript.coProcessArguments_BeforeNextFrame)
|
||||
end
|
||||
|
||||
if ExportScript.NoLuaExportBeforeNextFrame == false then
|
||||
ExportScript.Tools.ProcessOutput()
|
||||
end
|
||||
|
||||
tNext = tNext + ExportScript.Config.ExportInterval
|
||||
|
||||
return tNext
|
||||
end
|
||||
|
||||
function LuaExportStop()
|
||||
-- Works once just after mission stop.
|
||||
if ExportScript.Config.DACExport then
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- A-10A Export
|
||||
-- Version 1.0.2
|
||||
-- A-10A
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.A10A = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
-- AJS37 Export
|
||||
-- Version 1.0.2
|
||||
-- AJS37
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.AJS37 = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
@@ -84,8 +84,9 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
[145] = "%.4f", -- FuelNeeded {0.0, 1.0} {0.0, 135.0}
|
||||
-- Clock
|
||||
[130] = "%.4f", -- Hour
|
||||
--[] = "%.4f", -- Minute
|
||||
[133] = "%.4f", -- Second
|
||||
[131] = "%.4f", -- Minute
|
||||
[133] = "%.4f", -- Second (Arrow)
|
||||
[1333] = "%.4f", -- Second
|
||||
--
|
||||
[141] = "%.4f", -- Engine pressure ratio EPR indicator
|
||||
-- INSTRUMENTS Right Panel
|
||||
@@ -241,12 +242,12 @@ ExportScript.ConfigArguments =
|
||||
[203] = "%1d", -- Main Electric Power
|
||||
[207] = "%1d", -- Generator
|
||||
[209] = "%1d", -- Master Mode Selector
|
||||
[446] = "%1d", -- "Master Caution Reset
|
||||
[446] = "%1d", -- Master Caution Reset
|
||||
[323] = "%1d", -- Slav SI
|
||||
[324] = "%1d", -- HÖJD CISI
|
||||
--[0] = "%1d", -- Snabbresning
|
||||
[123] = "%1d", -- Backup ADI Cage
|
||||
[126] = "%.3f", -- Backup Altimeter Setting (Axis) {0.0,1.0} in 0.001 steps
|
||||
--[123] = "%1d", -- Backup ADI Cage
|
||||
--[126] = "%.3f", -- Backup Altimeter Setting (Axis) {0.0,1.0} in 0.001 steps
|
||||
[311] = "%1d", -- Pitch Gear Automatic/Landing
|
||||
-- Countermeasure panel
|
||||
[317] = "%.1f", -- Jammer Operation Mode Selector {0.0,0.1,0.2,0.3,0.4}
|
||||
@@ -261,7 +262,7 @@ ExportScript.ConfigArguments =
|
||||
[9] = "%1d", -- Canopy Open/Close {-1.0,0.0,1.0}
|
||||
[210] = "%1d", -- Canopy Jettison
|
||||
---
|
||||
[210] = "%1d", -- Countermeasure Fast Release {-1.0,0.0,1.0}
|
||||
[184] = "%1d", -- Countermeasure Release {-1.0,0.0,1.0}
|
||||
[316] = "%1d", -- Manual Fuel Regulator
|
||||
[212] = "%1d", -- Roll Centering
|
||||
[390] = "%1d", -- Emergency Roll Trim {-1.0,0.0,1.0}
|
||||
@@ -356,7 +357,9 @@ ExportScript.ConfigArguments =
|
||||
[211] = "%.2f", -- Autopilot yaw correction RENFLYGN (Axis) {0.0,1.0} in 0.01 steps
|
||||
[400] = "%1d", -- Missile Select Button
|
||||
[399] = "%.3f", -- Master Volume / Sidewinder Tone (Axis) {0.0,1.0} in 0.001 steps
|
||||
[1201] = "%.1f" -- Magnetic Declination Correction (Axis) {0.0,1.0} in 0.1 steps
|
||||
[1201] = "%.1f", -- Magnetic Declination Correction (Axis) {0.0,1.0} in 0.1 steps
|
||||
-- Clock
|
||||
[135] = "%.3f", -- Clock Setting
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
-- Bf-109K-4 Kurfürst
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.Bf109K4 = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- Module Name Export
|
||||
-- Version
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.<ModuleName> = "1.2.X"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- F-15C Export
|
||||
-- Version 1.0.2
|
||||
-- F-15C
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.F15C = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- F-5E-3
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.F5E3 = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
@@ -55,7 +55,7 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
-- AirSpeed/Mach Indicator
|
||||
[8] = "%.4f", -- Airspeed {0.0, 0.0435, 0.1, 0.318, 0.3745, 0.397, 0.4495, 0.482, 0.54, 0.553, 0.6145, 0.658, 0.668, 0.761, 0.801, 0.877, 0.909, 0.942, 0.972, 1.0} {0.0, 80.0, 100.0, 170.0, 190.0, 200.0, 230.0, 250.0, 290.0, 300.0, 350.0, 390.0, 400.0, 500.0, 550.0, 650.0, 700.0, 750.0, 800.0, 850.0}
|
||||
[178] = "%.4f", -- MaxAirspeed {0.0, 0.0435, 0.1, 0.318, 0.3745, 0.397, 0.4495, 0.482, 0.54, 0.553, 0.6145, 0.658, 0.668, 0.761, 0.801, 0.877, 0.909, 0.942, 0.972, 1.0} {0.0, 80.0, 100.0, 170.0, 190.0, 200.0, 230.0, 250.0, 290.0, 300.0, 350.0, 390.0, 400.0, 500.0, 550.0, 650.0, 700.0, 750.0, 800.0, 850.0}
|
||||
[177] = "%.f", -- SetAirspeed
|
||||
[177] = "%.4f", -- SetAirspeed
|
||||
[179] = "%.4f", -- MachIndicator {1.0, 0.957, 0.92, 0.631, 0.386} {0.0, 0.5, 1.0, 1.8, 2.5}
|
||||
-- Vertical Velocity Indicator
|
||||
[24] = "%.4f", -- Variometer {-1.0, -0.64, -0.5, -0.29, 0.0, 0.29, 0.5, 0.64, 1.0} {-6000.0, -3000.0, -2000.0, -1000.0, 0.0, 1000.0, 2000.0, 3000.0, 6000.0}
|
||||
@@ -93,7 +93,7 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
[438] = "%.4f", -- SAI_Pitch {-0.665, -0.581, -0.5, 0.0, 0.5, 0.581, 0.676, 0.735} {-rad_(78.0), -rad_(60.0), -rad_(42.0), 0.0, rad_(42.0), rad_(60.0), rad_(80.0), rad_(92.0)}
|
||||
[439] = "%.4f", -- SAI_Bank {1.0, -1.0} {-math.pi, math.pi}
|
||||
[440] = "%.4f", -- SAI_OFF_flag
|
||||
[443] = "%.4f", -- SAI_knob_arrow {-1.0, 1.0} {0.0, 1.0}
|
||||
--[443] = "%.4f", -- SAI_knob_arrow {-1.0, 1.0} {0.0, 1.0}
|
||||
-- Clock
|
||||
[19] = "%.4f", -- CLOCK_currtime_hours
|
||||
[18] = "%.4f", -- CLOCK_currtime_minutes
|
||||
@@ -138,7 +138,7 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
[600] = "%.4f", -- FlowBlinker
|
||||
-- RADIO ------------------------------------------------------
|
||||
-- UHF Radio AN/ARC-164
|
||||
[326] = "%.1f", -- UHFRadioChannel
|
||||
[326] = "%.2f", -- UHFRadioChannel
|
||||
[302] = "%.1f", -- UHFRadio100MHz
|
||||
[303] = "%.1f", -- UHFRadio10MHz {1.0, 0.0} {0.0, 1.0}
|
||||
[304] = "%.1f", -- UHFRadio1MHz {1.0, 0.0} {0.0, 1.0}
|
||||
@@ -151,7 +151,7 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
[263] = "%.4f", -- TACAN_window_wheel.hundreds {0.0, 1.0} {0.0, 10.0}
|
||||
[264] = "%.4f", -- TACAN_window_wheel.tens {0.0, 1.0} {0.0, 10.0}
|
||||
[265] = "%.4f", -- TACAN_window_wheel.ones {0.0, 1.0} {0.0, 10.0}
|
||||
[266] = "%.4f", -- XYwheel
|
||||
--[266] = "%.4f", -- XYwheel
|
||||
[260] = "%.f", -- TACAN_test_light
|
||||
-- LAMPS
|
||||
-- Engine Fire Lights
|
||||
@@ -391,7 +391,7 @@ ExportScript.ConfigArguments =
|
||||
[567] = "%1d", -- RWR Indicator Control SYS TEST Button
|
||||
[570] = "%1d", -- RWR Indicator Control UNKNOWN SHIP Button
|
||||
[573] = "%1d", -- RWR Indicator Control ACT/PWR Button
|
||||
[575] = "%1d", -- RWR Indicator Control POWER Button
|
||||
[575] = "%1d", -- RWR Indicator Control POWER Button {1.0,0.0,-1.0}
|
||||
[577] = "%.1f", -- RWR Indicator Control AUDIO Knob (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[578] = "%.1f", -- RWR Indicator Control DIM Knob (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- AN/ALR-87 RWR
|
||||
@@ -467,11 +467,11 @@ ExportScript.ConfigArguments =
|
||||
[246] = "%1d", -- CB LDG-TAXI LAMP PWR, ON/OFF {1.0, 0.0}
|
||||
--UHF Radio AN/ARC-164
|
||||
[300] = "%.2f", -- AN/ARC-164, UHF Radio Preset Channel Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, ... 0.15, 0.16, 0.17, 0.18, 0.19}
|
||||
[327] = "%.1f", -- AN/ARC-164, UHF Radio 100 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3}
|
||||
[328] = "%.1f", -- AN/ARC-164, UHF Radio 10 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}
|
||||
[329] = "%.1f", -- AN/ARC-164, UHF Radio 1 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}
|
||||
[330] = "%.1f", -- AN/ARC-164, UHF Radio 0.1 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}
|
||||
[331] = "%.2f", -- AN/ARC-164, UHF Radio 0.025 MHz Frequency Selector Knob {0.0, 0.25, 0.5, 0.75}
|
||||
--[327] = "%.1f", -- AN/ARC-164, UHF Radio 100 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3}
|
||||
--[328] = "%.1f", -- AN/ARC-164, UHF Radio 10 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}
|
||||
--[329] = "%.1f", -- AN/ARC-164, UHF Radio 1 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}
|
||||
--[330] = "%.1f", -- AN/ARC-164, UHF Radio 0.1 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}
|
||||
--[331] = "%.2f", -- AN/ARC-164, UHF Radio 0.025 MHz Frequency Selector Knob {0.0, 0.25, 0.5, 0.75}
|
||||
[307] = "%.1f", -- AN/ARC-164, UHF Radio Frequency Mode Selector Switch, MANUAL/PRESET/GUARD {0.0, 0.1, 0.2}
|
||||
[311] = "%.1f", -- AN/ARC-164, UHF Radio Function Selector Switch, OFF/MAIN/BOTH/ADF {0.0, 0.1, 0.2}
|
||||
[310] = "%1d", -- AN/ARC-164, UHF Radio Tone Button
|
||||
@@ -510,6 +510,9 @@ function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
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))
|
||||
]]
|
||||
|
||||
--[443] = "%.4f", -- SAI_knob_arrow {-1.0, 1.0} {0.0, 1.0}
|
||||
ExportScript.Tools.SendData(443, ExportScript.Tools.negate(mainPanelDevice:get_argument_value(443)))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
@@ -549,15 +552,65 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
if lUHFRadio:is_on() then
|
||||
--ExportScript.Tools.SendData(2000, string.format("%.3f", lUHFRadio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.RoundFreqeuncy(lUHFRadio:get_frequency()/1000000))
|
||||
|
||||
local lUHFRadio_PRESET = {[0.0]="01",[0.1]="02",[0.2]="03",[0.3]="04",[0.4]="05",[0.5]="06",[0.6]="07",[0.7]="08",[0.8]="09",[0.9]="10",[0.10]="11",[0.11]="12",[0.12]="13",[0.13]="14",[0.14]="15",[0.15]="16",[0.16]="17",[0.17]="18",[0.18]="19",[0.19]="20"}
|
||||
|
||||
local lUHFRadio_PRESET = {[0]="01",[0.05]="02",[0.1]="03",[0.15]="04",[0.2]="05",[0.25]="06",[0.3]="07",[0.35]="08",[0.4]="09",[0.45]="10",[0.5]="11",[0.55]="12",[0.6]="13",[0.65]="14",[0.7]="15",[0.75]="16",[0.80]="17",[0.85]="18",[0.90]="19",[0.95]="20"}
|
||||
ExportScript.Tools.SendData(2001, lUHFRadio_PRESET[ExportScript.Tools.round(mainPanelDevice:get_argument_value(300), 2)])
|
||||
end
|
||||
|
||||
--[327] = "%.1f", -- AN/ARC-164, UHF Radio 100 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3}
|
||||
--[328] = "%.1f", -- AN/ARC-164, UHF Radio 10 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}
|
||||
--[329] = "%.1f", -- AN/ARC-164, UHF Radio 1 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}
|
||||
--[330] = "%.1f", -- AN/ARC-164, UHF Radio 0.1 MHz Frequency Selector Knob {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}
|
||||
--[331] = "%.2f", -- AN/ARC-164, UHF Radio 0.025 MHz Frequency Selector Knob {0.0, 0.25, 0.5, 0.75}
|
||||
--F5E_UHF
|
||||
--327: 0.0=A, 0.1=3, 0.2=2, 0.3=T
|
||||
--1: 0.0=A, 0.1=T, 0.2=2, 0.3=3
|
||||
|
||||
--328: 0.0=0, 0.1=9, 0.2=8, 0.3=7, 0.4=6, 0.5=5, 0.6=4, 0.7=3, 0.8=2, 0.9=1, 1.0=0
|
||||
--2: 0.0=0, 0.1=1, 0.2=2, 0.3=3, 0.4=4, 0.5=5, 0.6=6, 0.7=7, 0.8=8, 0.9=9, 1.0=0
|
||||
|
||||
--329: 0.0=0, 0.1=9, 0.2=8, 0.3=7, 0.4=6, 0.5=5, 0.6=4, 0.7=3, 0.8=2, 0.9=1, 1.0=0
|
||||
--3: 0.0=0, 0.1=1, 0.2=2, 0.3=3, 0.4=4, 0.5=5, 0.6=6, 0.7=7, 0.8=8, 0.9=9, 1.0=0
|
||||
|
||||
--330: 0.0=0, 0.1=9, 0.2=8, 0.3=7, 0.4=6, 0.5=5, 0.6=4, 0.7=3, 0.8=2, 0.9=1, 1.0=0
|
||||
--4: 0.0=0, 0.1=1, 0.2=2, 0.3=3, 0.4=4, 0.5=5, 0.6=6, 0.7=7, 0.8=8, 0.9=9, 1.0=0
|
||||
|
||||
--331: 0.0=00, 0.25=75, 0.5=50, 0.75=25, 1.0=00
|
||||
--5: 0.0=00, 0.25=25, 0.5=50, 0.75=75
|
||||
|
||||
local lTmp327 = tonumber(string.format("%0.1f", mainPanelDevice:get_argument_value(327)))
|
||||
local lTmp327_2 = lTmp327
|
||||
if lTmp327 == 0.0 then lTmp327_2 = 0.0
|
||||
elseif lTmp327 == 0.1 then lTmp327_2 = 0.3
|
||||
elseif lTmp327 == 0.2 then lTmp327_2 = 0.2
|
||||
elseif lTmp327 == 0.3 then lTmp327_2 = 0.1
|
||||
else lTmp327_2 = lTmp327 end
|
||||
|
||||
local lTmp328_2 = 1 - mainPanelDevice:get_argument_value(328)
|
||||
local lTmp329_2 = 1 - mainPanelDevice:get_argument_value(329)
|
||||
local lTmp330_2 = 1 - mainPanelDevice:get_argument_value(330)
|
||||
|
||||
local lTmp331 = mainPanelDevice:get_argument_value(331)
|
||||
local lTmp331_2 = 0
|
||||
if lTmp331 == 0.0 then lTmp331_2 = 0.0
|
||||
elseif lTmp331 == 0.25 then lTmp331_2 = 0.75
|
||||
elseif lTmp331 == 0.5 then lTmp331_2 = 0.5
|
||||
elseif lTmp331 == 0.75 then lTmp331_2 = 0.25
|
||||
else lTmp331_2 = lTmp331 end
|
||||
|
||||
ExportScript.Tools.SendData(327, lTmp327_2)
|
||||
ExportScript.Tools.SendData(328, lTmp328_2)
|
||||
ExportScript.Tools.SendData(329, lTmp329_2)
|
||||
ExportScript.Tools.SendData(330, lTmp330_2)
|
||||
ExportScript.Tools.SendData(331, lTmp331_2)
|
||||
|
||||
|
||||
-- TACAN Channel
|
||||
-------------------------------------------------
|
||||
ExportScript.Tools.SendData(2002, (string.format("%0.2f", (mainPanelDevice:get_argument_value(263))) == "1.00" and "0" or "1")..ExportScript.Tools.round(mainPanelDevice:get_argument_value(264) * 10, 0)..ExportScript.Tools.round(mainPanelDevice:get_argument_value(265) * 10, 0)..(string.format("%1d", (mainPanelDevice:get_argument_value(266))) == "0" and "X" or "Y"))
|
||||
|
||||
--[266] = "%.4f", -- XYwheel
|
||||
ExportScript.Tools.SendData(266, mainPanelDevice:get_argument_value(266) == 0 and 0 or 1)
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
@@ -579,8 +632,8 @@ function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
if lUHFRadio:is_on() then
|
||||
--ExportScript.Tools.SendDataDAC(2000, string.format("%.3f", lUHFRadio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC(2000, ExportScript.Tools.RoundFreqeuncy(lUHFRadio:get_frequency()/1000000))
|
||||
|
||||
local lUHFRadio_PRESET = {[0.0]="01",[0.1]="02",[0.2]="03",[0.3]="04",[0.4]="05",[0.5]="06",[0.6]="07",[0.7]="08",[0.8]="09",[0.9]="10",[0.10]="11",[0.11]="12",[0.12]="13",[0.13]="14",[0.14]="15",[0.15]="16",[0.16]="17",[0.17]="18",[0.18]="19",[0.19]="20"}
|
||||
|
||||
local lUHFRadio_PRESET = {[0]="01",[0.05]="02",[0.1]="03",[0.15]="04",[0.2]="05",[0.25]="06",[0.3]="07",[0.35]="08",[0.4]="09",[0.45]="10",[0.5]="11",[0.55]="12",[0.6]="13",[0.65]="14",[0.7]="15",[0.75]="16",[0.80]="17",[0.85]="18",[0.90]="19",[0.95]="20"}
|
||||
ExportScript.Tools.SendDataDAC(2001, lUHFRadio_PRESET[ExportScript.Tools.round(mainPanelDevice:get_argument_value(300), 2)])
|
||||
end
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- F-86 Export
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.F86 = "1.2.1"
|
||||
--ExportScript.NoLuaExportBeforeNextFrame = true
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
|
||||
@@ -0,0 +1,746 @@
|
||||
-- F/A-18C Export
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.FA18C_hornet = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- Controlls
|
||||
--[71] = "%.4f", -- StickPitch {-1, 0, 0.137, 0.5} {1, 0.12, 0, -0.726}
|
||||
--[74] = "%.4f", -- StickRoll {-1, 1}
|
||||
--[500] = "%.4f", -- Rudder {-1, 1}
|
||||
--[501] = "%.4f", -- LeftWheelBrake
|
||||
--[502] = "%.4f", -- RightWheelBrake
|
||||
--[104] = "%.4f", -- LeftThrottle
|
||||
--[105] = "%.4f", -- RightThrottle
|
||||
--[495] = "%.4f", -- LeftFingerLift
|
||||
--[496] = "%.4f", -- RightFingerLift
|
||||
-- Electric Interface
|
||||
[400] = "%.4f", -- VoltmeterU {16.0, 30.0}{0.0, 1.0}
|
||||
[401] = "%.4f", -- VoltmeterE {16.0, 30.0}{0.0, 1.0}
|
||||
-- Hydraulic Interface
|
||||
[310] = "%.4f", -- HydIndLeft {0.0, 5000.0} {0.0, 1.0}
|
||||
[311] = "%.4f", -- HydIndRight {0.0, 5000.0} {0.0, 1.0}
|
||||
[242] = "%.4f", -- HydIndBrake {0.0, 1000.0, 2000.0, 3000.0, 4000.0, 5000.0}{0.0, 0.036, 0.338, 0.636, 0.924, 1.0}
|
||||
-- Gear Interface
|
||||
[228] = "%.4f", -- EmergGearDownHandle
|
||||
[240] = "%.4f", -- EmergParkBrakeHandle
|
||||
-- Instruments --------------------------
|
||||
-- Standby Pressure Altimeter AAU-52/A
|
||||
[218] = "%.4f", -- Altimeter_100_footPtr {0.0, 1000.0} {0.0, 1.0}
|
||||
[220] = "%.4f", -- Altimeter_10000_footCount {0.0, 9.0} {0.0, 1.0}
|
||||
[219] = "%.4f", -- Altimeter_1000_footCount {0.0, 9.0} {0.0, 1.0}
|
||||
[221] = "%.4f", -- pressure_setting_0 {0.0, 10.0} {0.0, 1.0}
|
||||
[222] = "%.4f", -- pressure_setting_1 {0.0, 10.0} {0.0, 1.0}
|
||||
[223] = "%.4f", -- pressure_setting_2 {0.0, 10.0} {0.0, 1.0}
|
||||
-- Indicated Airspeed Indicator AVU-35/A
|
||||
[217] = "%.4f", -- Airspeed {0.0, 60.0, 100.0, 150.0, 200.0, 250.0, 300.0, 350.0, 400.0, 450.0, 500.0, 550.0, 600.0, 650.0, 700.0, 750.0, 800.0, 850.0} {0.0, 0.0445, 0.15, 0.348, 0.586, 0.636, 0.673, 0.715, 0.748, 0.782, 0.819, 0.849, 0.870, 0.898, 0.922, 0.950, 0.976, 1.0}
|
||||
-- Vertical Speed Indicator AVU-53/A
|
||||
[225] = "%.4f", -- Variometer {-6000.0, -4000.0, -3000.0, -2000.0, -1000.0, -500.0, 0.0, 500.0, 1000.0, 2000.0, 3000.0, 4000.0, 6000.0} { -1.0, -0.83, -0.73, -0.605, -0.40, -0.22, 0.0, 0.22, 0.40, 0.605, 0.73, 0.83, 1.0}
|
||||
-- Clock
|
||||
[278] = "%.4f", -- CLOCK_currtime_hour {0.0, 12.0} {0.0, 1.0}
|
||||
[279] = "%.4f", -- CLOCK_currtime_minutes {0.0, 60.0} {0.0, 1.0}
|
||||
[281] = "%.4f", -- CLOCK_elapsed_time_minutes {0.0, 60.0} {0.0, 1.0}
|
||||
[280] = "%.4f", -- CLOCK_elapsed_time_seconds {0.0, 60.0} {0.0, 1.0}
|
||||
-- ID-2163/A
|
||||
[287] = "%.4f", -- Min_Height_Indicator_ID2163A {-0.03, 0.0, 0.5, 0.8, 1.0} {0.0, 0.031, 0.525, 0.802, 0.982}
|
||||
[286] = "%.4f", -- Altitude_Pointer_ID2163A {-10.0, 0.0, 100.0, 200.0, 300.0, 400.0, 600.0, 800.0, 1000.0, 3000.0, 5000.0, 5100.0} {0.0, 0.048, 0.171, 0.296, 0.416, 0.530, 0.616, 0.706, 0.799, 0.886, 0.974, 0.98}
|
||||
[288] = "%.4f", -- OFF_Flag_ID2163A
|
||||
[290] = "%1d", -- Red_Lamp_ID2163A
|
||||
[289] = "%1d", -- Green_Lamp_ID2163A
|
||||
-- SAI
|
||||
[205] = "%.4f", -- SAI_Pitch {-1.0, 1.0}
|
||||
[206] = "%.4f", -- SAI_Bank {-1.0, 1.0}
|
||||
[209] = "%.4f", -- SAI_attitude_warning_flag
|
||||
[210] = "%.4f", -- SAI_manual_pitch_adjustment {0.0, 1.0} {-1.0, 1.0}
|
||||
[207] = "%.4f", -- SAI_SlipBall {-1.0, 1.0}
|
||||
[208] = "%.4f", -- SAI_RateOfTurn {-3.0, 3.0} {-1.0, 1.0}
|
||||
[211] = "%.4f", -- SAI_vertical_pointer {-1.0, 1.0}
|
||||
[212] = "%.4f", -- SAI_horisontal_pointer {-1.0, 1.0}
|
||||
-- Cockpit Pressure Altimeter
|
||||
[285] = "%.4f", -- CockpitPressureAltimeter {0.0, 5000.0, 10000.0, 15000.0, 20000.0, 25000.0, 30000.0, 35000.0, 40000.0, 45000.0, 50000.0} {0.0, 0.117, 0.2245, 0.3225, 0.411, 0.506, 0.609, 0.717, 0.823, 0.914, 1.0}
|
||||
-- Caution Light Indicator Panel
|
||||
[298] = "%1d", -- CPT_LTS_CK_SEAT
|
||||
[299] = "%1d", -- CPT_LTS_APU_ACC
|
||||
[300] = "%1d", -- CPT_LTS_BATT_SW
|
||||
[301] = "%1d", -- CPT_LTS_FCS_HOT
|
||||
[302] = "%1d", -- CPT_LTS_GEN_TIE
|
||||
[303] = "%1d", -- CPT_LTS_SPARE_CTN1
|
||||
[304] = "%1d", -- CPT_LTS_FUEL_LO
|
||||
[305] = "%1d", -- CPT_LTS_FCES
|
||||
[306] = "%1d", -- CPT_LTS_SPARE_CTN2
|
||||
[307] = "%1d", -- CPT_LTS_L_GEN
|
||||
[308] = "%1d", -- CPT_LTS_R_GEN
|
||||
[309] = "%1d", -- CPT_LTS_SPARE_CTN3
|
||||
-- LH Advisory and Threat Warning Indicator Panel
|
||||
[13] = "%1d", -- CPT_LTS_MASTER_CAUTION
|
||||
[10] = "%1d", -- CPT_LTS_FIRE_LEFT
|
||||
[15] = "%1d", -- CPT_LTS_GO
|
||||
[16] = "%1d", -- CPT_LTS_NO_GO
|
||||
[17] = "%1d", -- CPT_LTS_L_BLEED
|
||||
[18] = "%1d", -- CPT_LTS_R_BLEED
|
||||
[19] = "%1d", -- CPT_LTS_SPD_BRK
|
||||
[20] = "%1d", -- CPT_LTS_STBY
|
||||
[21] = "%1d", -- CPT_LTS_L_BAR_RED
|
||||
[22] = "%1d", -- CPT_LTS_REC
|
||||
[23] = "%1d", -- CPT_LTS_L_BAR_GREEN
|
||||
[24] = "%1d", -- CPT_LTS_XMIT
|
||||
[25] = "%1d", -- CPT_LTS_ASPJ_OH
|
||||
-- RH Advisory and Threat Warning Indicator Panel
|
||||
[29] = "%1d", -- CPT_LTS_FIRE_APU
|
||||
[26] = "%1d", -- CPT_LTS_FIRE_RIGHT
|
||||
[31] = "%1d", -- CPT_LTS_RCDR_ON
|
||||
[32] = "%1d", -- CPT_LTS_DISP
|
||||
[38] = "%1d", -- CPT_LTS_SAM
|
||||
[39] = "%1d", -- CPT_LTS_AI
|
||||
[40] = "%1d", -- CPT_LTS_AAA
|
||||
[41] = "%1d", -- CPT_LTS_CW
|
||||
[33] = "%1d", -- CPT_LTS_SPARE_RH1
|
||||
[34] = "%1d", -- CPT_LTS_SPARE_RH2
|
||||
[35] = "%1d", -- CPT_LTS_SPARE_RH3
|
||||
[36] = "%1d", -- CPT_LTS_SPARE_RH4
|
||||
[37] = "%1d", -- CPT_LTS_SPARE_RH5
|
||||
-- Flaps, Landing Gear and Stores Indicator Panel
|
||||
[152] = "%1d", -- CPT_LTS_CTR
|
||||
[154] = "%1d", -- CPT_LTS_LI
|
||||
[156] = "%1d", -- CPT_LTS_LO
|
||||
[158] = "%1d", -- CPT_LTS_RI
|
||||
[160] = "%1d", -- CPT_LTS_RO
|
||||
[166] = "%1d", -- CPT_LTS_NOSE_GEAR
|
||||
[165] = "%1d", -- CPT_LTS_LEFT_GEAR
|
||||
[167] = "%1d", -- CPT_LTS_RIGHT_GEAR
|
||||
[163] = "%1d", -- CPT_LTS_HALF_FLAPS
|
||||
[164] = "%1d", -- CPT_LTS_FULL_FLAPS
|
||||
[162] = "%1d", -- CPT_LTS_FLAPS
|
||||
-- Lock/Shoot Light Assy
|
||||
[1] = "%1d", -- CPT_LTS_LOCK
|
||||
[2] = "%1d", -- CPT_LTS_SHOOT
|
||||
[3] = "%1d", -- CPT_LTS_SHOOT_STROBE
|
||||
-- Master Arm Control
|
||||
[47] = "%1d", -- CPT_LTS_AA
|
||||
[48] = "%1d", -- CPT_LTS_AG
|
||||
[45] = "%1d", -- CPT_LTS_DISCH
|
||||
[44] = "%1d", -- CPT_LTS_READY
|
||||
-- Arresting Hook Control Handle
|
||||
[294] = "%1d", -- CPT_LTS_HOOK
|
||||
-- Landing Gear
|
||||
--[] = "%1d", -- CPT_LTS_LDG_GEAR_HANDLE
|
||||
-- APU Control Panel
|
||||
[376] = "%1d", -- CPT_LTS_APU_READY
|
||||
-- ECM Control Panel Assy
|
||||
--[] = "%1d", -- CPT_LTS_SEL
|
||||
-- Map Gain Control Panel Assy
|
||||
[137] = "%1d", -- CPT_LTS_SPN
|
||||
-- Height Indicator
|
||||
[290] = "%1d", -- CPT_LTS_LOW_ALT_WARN
|
||||
-- AoA Indexer Lights
|
||||
[4] = "%1d", -- CPT_LTS_AOA_HIGH
|
||||
[5] = "%1d", -- CPT_LTS_AOA_CENTER
|
||||
[6] = "%1d", -- CPT_LTS_AOA_LOW
|
||||
-- Internal Lights
|
||||
--[460] = "%.1f", -- Console
|
||||
--[461] = "%.1f", -- Flood
|
||||
--[462] = "%.1f", -- NvgFlood
|
||||
--[464] = "%.1f", -- EmerInstr
|
||||
--[465] = "%.1f", -- EngInstFlood
|
||||
--[466] = "%.1f", -- Instrument
|
||||
--[467] = "%.1f", -- StbyCompass
|
||||
--[810] = "%.1f", -- Utility
|
||||
--[463] = "%.1f", -- Chart
|
||||
-- WCAGroupLightness
|
||||
--[521] = "%.1f", -- WCAGroupLightness 1
|
||||
--[522] = "%.1f", -- WCAGroupLightness 2
|
||||
--[523] = "%.1f", -- WCAGroupLightness 3
|
||||
-- IFEI
|
||||
[468] = "%1d", -- IFEI
|
||||
[469] = "%1d", -- IFEI_buttons
|
||||
-- RWR
|
||||
[276] = "%1d", -- Lower
|
||||
[273] = "%1d", -- Limit
|
||||
[274] = "%1d", -- Display
|
||||
--[270] = "%1d", -- SpecialEn
|
||||
[271] = "%1d", -- Special
|
||||
[267] = "%1d", -- Enable
|
||||
[268] = "%1d", -- Offset
|
||||
[264] = "%1d", -- Fail
|
||||
[265] = "%1d", -- Bit
|
||||
[520] = "%.1f", -- RwrLightsBrightness
|
||||
-- CMDS
|
||||
[516] = "%1d", -- ecmJett
|
||||
-- Magnetic compas
|
||||
[149] = "%.4f", -- heading
|
||||
[150] = "%.4f", -- pitch
|
||||
[151] = "%.4f", -- bank
|
||||
}
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
-- Control System
|
||||
[345] = "%.2f", -- RUD TRIM Control (Axis) {-1.0, 1.0} in 0.05 Steps
|
||||
[346] = "%1d", -- T/O TRIM Button
|
||||
[349] = "%1d", -- FCS RESET Button
|
||||
[347] = "%1d", -- GAIN Switch, NORM/ORIDE
|
||||
[234] = "%1d", -- FLAP Switch, AUTO/HALF/FULL {-1.0,0.0,1.0}
|
||||
[138] = "%1d", -- Spin Recovery Switch, RCVY/NORM
|
||||
[470] = "%1d", -- FCS BIT Switch
|
||||
[295] = "%1d", -- Wing Fold Control Handle, (RMB)CW/(LMB)CCW
|
||||
[296] = "%1d", -- Wing Fold Control Handle, (MW)PULL/STOW
|
||||
[504] = "%.1f", -- Throttles Friction Adjusting Lever (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- Electric system
|
||||
[404] = "%1d", -- Battery Switch, ON/OFF/ORIDE {-1.0,0.0,1.0}
|
||||
[402] = "%1d", -- Left Generator Control Switch, NORM/OFF
|
||||
[403] = "%1d", -- Right Generator Control Switch, NORM/OFF
|
||||
[378] = "%1d", -- Generator TIE Control Switch, NORM/RESET
|
||||
[336] = "%1d", -- External Power Switch, RESET/NORM/OFF {-1.0,0.0,1.0}
|
||||
[332] = "%1d", -- Ground Power Switch 1, A ON/AUTO/B ON {-1.0,0.0,1.0}
|
||||
[333] = "%1d", -- Ground Power Switch 2, A ON/AUTO/B ON {-1.0,0.0,1.0}
|
||||
[334] = "%1d", -- Ground Power Switch 3, A ON/AUTO/B ON {-1.0,0.0,1.0}
|
||||
[335] = "%1d", -- Ground Power Switch 4, A ON/AUTO/B ON {-1.0,0.0,1.0}
|
||||
-- Anti-Ice
|
||||
[409] = "%1d", -- Pitot Heater Switch, ON/AUTO
|
||||
[410] = "%1d", -- Engine Anti-Ice Switch, ON/OFF/TEST {-1.0,0.0,1.0}
|
||||
-- CB
|
||||
[381] = "%1d", -- CB FCS CHAN 1, ON/OFF
|
||||
[382] = "%1d", -- CB FCS CHAN 2, ON/OFF
|
||||
[383] = "%1d", -- CB SPD BRK, ON/OFF
|
||||
[384] = "%1d", -- CB LAUNCH BAR, ON/OFF
|
||||
[454] = "%1d", -- CB FCS CHAN 3, ON/OFF
|
||||
[455] = "%1d", -- CB FCS CHAN 4, ON/OFF
|
||||
[456] = "%1d", -- CB HOOK, ON/OFF
|
||||
[457] = "%1d", -- CB LG, ON/OFF
|
||||
--
|
||||
[368] = "%1d", -- MC Switch, 1 OFF/NORM/2 OFF {-1.0,0.0,1.0}
|
||||
-- Power Plant
|
||||
[375] = "%1d", -- APU Control Switch, ON/OFF
|
||||
[377] = "%1d", -- Engine Crank Switch, LEFT/OFF/RIGHT {-1.0,0.0,1.0}
|
||||
[331] = "%1d", -- Fire and Bleed Air Test Switch, (RMB) TEST A/(LMB) TEST B {-1.0,0.0,1.0}
|
||||
-- Hydraulic system
|
||||
[369] = "%1d", -- Hydraulic Isolate Override Switch, NORM/ORIDE
|
||||
-- Gear system
|
||||
[226] = "%1d", -- Landing Gear Control Handle, (RMB)UP/(LMB)DOWN {-1.0,0.0} ???
|
||||
[228] = "%1d", -- Landing Gear Control Handle, (MW)EMERGENCY DOWN {0.0,1.0} ???
|
||||
[229] = "%1d", -- Down Lock Override Button - Push to unlock
|
||||
[238] = "%1d", -- Anti Skid Switch, ON/OFF
|
||||
[240] = "%.3f", -- Emergency/Parking Brake Handle, (MW)Pull-Stow {0.0,1.0} in 0.001 Steps ???
|
||||
[241] = "%.3f", -- Emergency/Parking Brake Handle, (LMB)Rotate Left/(RMB)Rotate Right ???
|
||||
[233] = "%1d", -- Launch Bar Control Switch, EXTEND/RETRACT
|
||||
[293] = "%1d", -- Arresting Hook Handle, UP/DOWN
|
||||
-- Fuel system
|
||||
[340] = "%1d", -- Internal Wing Tank Fuel Control Switch, INHIBIT/NORM
|
||||
[341] = "%1d", -- Probe Control Switch, EXTEND/RETRACT/EMERG EXTD {-1.0,0.0}
|
||||
[344] = "%1d", -- Fuel Dump Switch, ON/OFF
|
||||
[343] = "%1d", -- External Centerline Tank Fuel Control Switch, STOP/NORM/ORIDE {-1.0,0.0}
|
||||
[342] = "%1d", -- External Wing Tanks Fuel Control Switch, STOP/NORM/ORIDE {-1.0,0.0}
|
||||
-- Cockpit Mechanics
|
||||
[453] = "%1d", -- Canopy Control Switch, OPEN/HOLD/CLOSE {-1.0,0.0,1.0}
|
||||
[43] = "%1d", -- Canopy Jettison Handle Unlock Button - Press to unlock
|
||||
[42] = "%1d", -- Canopy Jettison Handle - Pull to jettison
|
||||
[510] = "%1d", -- Ejection Control Handle (3 times)
|
||||
[511] = "%1d", -- Ejection Seat SAFE/ARMED Handle, SAFE/ARMED
|
||||
[512] = "%1d", -- Ejection Seat Manual Override Handle, PULL/PUSH
|
||||
[513] = "%1d", -- Shoulder Harness Control Handle, LOCK/UNLOCK
|
||||
[514] = "%1d", -- Seat Height Adjustment Switch, UP/HOLD/DOWN {-1.0,0.0,1.0}
|
||||
[260] = "%1d", -- Rudder Pedal Adjust Lever
|
||||
[575] = "%1d", -- Hide Stick toggle
|
||||
-- Exterior Lights
|
||||
[338] = "%.2f", -- POSITION Lights Dimmer Control {0.0,1.0} in 0.15 Steps
|
||||
[337] = "%.2f", -- FORMATION Lights Dimmer Control {0.0,1.0} in 0.15 Steps
|
||||
[339] = "%1d", -- STROBE Lights Switch, BRT/OFF/DIM {-1.0,0.0,1.0}
|
||||
[237] = "%1d", -- LDG/TAXI LIGHT Switch, ON/OFF
|
||||
-- Cockpit Lights
|
||||
[413] = "%.2f", -- CONSOLES Lights Dimmer Control {0.0,1.0} in 0.15 Steps
|
||||
[414] = "%.2f", -- INST PNL Dimmer Control {0.0,1.0} in 0.15 Steps
|
||||
[415] = "%.2f", -- FLOOD Light Dimmer Control {0.0,1.0} in 0.15 Steps
|
||||
[419] = "%1d", -- MODE Switch, NVG/NITE/DAY {-1.0,0.0,1.0}
|
||||
[418] = "%.2f", -- CHART Light Dimmer Control {0.0,1.0} in 0.15 Steps
|
||||
[417] = "%.2f", -- WARN/CAUTION Dimmer Control {0.0,1.0} in 0.15 Steps
|
||||
[416] = "%1d", -- Lights Test Switch, TEST/OFF
|
||||
[14] = "%1d", -- MASTER CAUTION Reset Button - Press to reset
|
||||
[239] = "%1d", -- HOOK BYPASS Switch, FIELD/CARRIER
|
||||
-- Oxygen System
|
||||
[365] = "%1d", -- OBOGS Control Switch, ON/OFF
|
||||
[366] = "%.2f", -- OXY Flow Knob {0.0,1.0} in 0.5 Steps
|
||||
-- ECS
|
||||
[411] = "%.1f", -- Bleed Air Knob, R OFF/NORM/L OFF/OFF {0.0,0.1,0.2,0.3}
|
||||
[412] = "%1d", -- Bleed Air Knob, AUG PULL
|
||||
[405] = "%1d", -- ECS Mode Switch, AUTO/MAN/ OFF/RAM {-1.0,0.0,1.0}
|
||||
[408] = "%1d", -- Cabin Pressure Switch, NORM/DUMP/ RAM/DUMP {-1.0,0.0,1.0}
|
||||
[451] = "%.2f", -- Defog Handle {0.0,1.0} in 0.1 Steps
|
||||
[407] = "%.2f", -- Cabin Temperature Knob {0.0,1.0} in 0.1 Steps
|
||||
[406] = "%.2f", -- Suit Temperature Knob {0.0,1.0} in 0.1 Steps
|
||||
[297] = "%1d", -- AV COOL Switch, NORM/EMERG
|
||||
[452] = "%1d", -- Windshield Anti-Ice/Rain Switch, ANTI ICE/OFF/RAIN {-1.0,0.0,1.0}
|
||||
[505] = "%.2f", -- Left Louver {0.0,1.0} in 0.1 Steps
|
||||
[506] = "%.2f", -- Right Louver {0.0,1.0} in 0.1 Steps
|
||||
-- HOTAS
|
||||
[494] = "%1d", -- Exterior Lights Switch, ON/OFF
|
||||
-- Master Arm Panel
|
||||
[458] = "%1d", -- Master Mode Button, A/A
|
||||
[459] = "%1d", -- Master Mode Button, A/G
|
||||
[49] = "%1d", -- Master Arm Switch, ARM/SAFE
|
||||
[50] = "%1d", -- Emergency Jettison Button
|
||||
[258] = "%1d", -- Auxiliary Release Switch, ENABLE/NORM
|
||||
[153] = "%1d", -- Station Jettison Select Button, CENTER
|
||||
[155] = "%1d", -- Station Jettison Select Button, LEFT IN
|
||||
[157] = "%1d", -- Station Jettison Select Button, LEFT OUT
|
||||
[159] = "%1d", -- Station Jettison Select Button, RIGHT IN
|
||||
[161] = "%1d", -- Station Jettison Select Button, RIGHT OUT
|
||||
[235] = "%1d", -- Selective Jettison Pushbutton
|
||||
[236] = "%1d", -- Selective Jettison Knob, L FUS MSL/SAFE/R FUS MSL/ RACK/LCHR /STORES {0.0,0.1,0.2,0.3,0.4}
|
||||
[135] = "%.1f", -- IR Cooling Switch, ORIDE/NORM/OFF {0.0,0.1,0.2}
|
||||
-- Fire Systems
|
||||
[46] = "%1d", -- Fire Extinguisher Pushbutton
|
||||
[30] = "%1d", -- APU Fire Warning/Extinguisher Light
|
||||
[11] = "%1d", -- Left Engine/AMAD Fire Warning/Extinguisher Light - (LMB) depress
|
||||
[12] = "%1d", -- Left Engine/AMAD Fire Warning/Extinguisher Light - (RMB) cover control
|
||||
[27] = "%1d", -- Right Engine/AMAD Fire Warning/Extinguisher Light - (LMB) depress
|
||||
[28] = "%1d", -- Right Engine/AMAD Fire Warning/Extinguisher Light - (RMB) cover control
|
||||
-- Multipurpose Display Group -----------
|
||||
-- Head-Up Display
|
||||
[140] = "%1d", -- HUD Symbology Reject Switch, NORM/REJ 1/REJ 2 {0.0,0.1,0.2}
|
||||
[141] = "%.2f", -- HUD Symbology Brightness Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[142] = "%1d", -- HUD Symbology Brightness Selector Knob, DAY/NIGHT
|
||||
[143] = "%.2f", -- HUD Black Level Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[144] = "%1d", -- HUD Video Control Switch, W/B /VID/OFF {0.0,0.1,0.2}
|
||||
[145] = "%.2f", -- HUD Balance Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[146] = "%.2f", -- HUD AOA Indexer Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[147] = "%1d", -- HUD Altitude Switch, BARO/RDR
|
||||
[148] = "%1d", -- HUD Attitude Selector Switch, INS/AUTO/STBY {-1.0,0.0,1.0}
|
||||
-- Left MDI
|
||||
[51] = "%1d", -- Left MDI Brightness Selector Knob, OFF/NIGHT/DAY {0.0,0.1,0.2}
|
||||
[52] = "%.2f", -- Left MDI Brightness Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[53] = "%.2f", -- Left MDI Contrast Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[54] = "%1d", -- Left MDI PB 1
|
||||
[55] = "%1d", -- Left MDI PB 2
|
||||
[56] = "%1d", -- Left MDI PB 3
|
||||
[57] = "%1d", -- Left MDI PB 4
|
||||
[58] = "%1d", -- Left MDI PB 5
|
||||
[59] = "%1d", -- Left MDI PB 6
|
||||
[60] = "%1d", -- Left MDI PB 7
|
||||
[61] = "%1d", -- Left MDI PB 8
|
||||
[62] = "%1d", -- Left MDI PB 9
|
||||
[63] = "%1d", -- Left MDI PB 10
|
||||
[64] = "%1d", -- Left MDI PB 11
|
||||
[65] = "%1d", -- Left MDI PB 12
|
||||
[66] = "%1d", -- Left MDI PB 13
|
||||
[67] = "%1d", -- Left MDI PB 14
|
||||
[68] = "%1d", -- Left MDI PB 15
|
||||
[69] = "%1d", -- Left MDI PB 16
|
||||
[70] = "%1d", -- Left MDI PB 17
|
||||
[72] = "%1d", -- Left MDI PB 18
|
||||
[73] = "%1d", -- Left MDI PB 19
|
||||
[75] = "%1d", -- Left MDI PB 20
|
||||
[312] = "%1d", -- Heading Set Switch
|
||||
[313] = "%1d", -- Course Set Switch
|
||||
-- Right MDI
|
||||
[76] = "%.1f", -- Right MDI Brightness Selector Knob, OFF/NIGHT/DAY {0.0,0.1,0.2}
|
||||
[77] = "%.2f", -- Right MDI Brightness Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[78] = "%.2f", -- Right MDI Contrast Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[79] = "%1d", -- Right MDI PB 1
|
||||
[80] = "%1d", -- Right MDI PB 2
|
||||
[81] = "%1d", -- Right MDI PB 3
|
||||
[82] = "%1d", -- Right MDI PB 4
|
||||
[83] = "%1d", -- Right MDI PB 5
|
||||
[84] = "%1d", -- Right MDI PB 6
|
||||
[85] = "%1d", -- Right MDI PB 7
|
||||
[86] = "%1d", -- Right MDI PB 8
|
||||
[87] = "%1d", -- Right MDI PB 9
|
||||
[88] = "%1d", -- Right MDI PB 10
|
||||
[89] = "%1d", -- Right MDI PB 11
|
||||
[90] = "%1d", -- Right MDI PB 12
|
||||
[91] = "%1d", -- Right MDI PB 13
|
||||
[92] = "%1d", -- Right MDI PB 14
|
||||
[93] = "%1d", -- Right MDI PB 15
|
||||
[94] = "%1d", -- Right MDI PB 16
|
||||
[95] = "%1d", -- Right MDI PB 17
|
||||
[96] = "%1d", -- Right MDI PB 18
|
||||
[97] = "%1d", -- Right MDI PB 19
|
||||
[98] = "%1d", -- Right MDI PB 20
|
||||
-- AMPCD
|
||||
[203] = "%.2f", -- AMPCD Off/Brightness Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[177] = "%1d", -- AMPCD Night/Day Brightness Selector, DAY/NGT {1.0,0.0,-1.0}
|
||||
[179] = "%1d", -- AMPCD Symbology Control Switch, UP/DOWN {1.0,0.0,-1.0}
|
||||
[182] = "%1d", -- AMPCD Contrast Control Switch, UP/DOWN {1.0,0.0,-1.0}
|
||||
[180] = "%1d", -- AMPCD Gain Control Switch, UP/DOWN {1.0,0.0,-1.0}
|
||||
[183] = "%1d", -- AMPCD PB 1
|
||||
[184] = "%1d", -- AMPCD PB 2
|
||||
[185] = "%1d", -- AMPCD PB 3
|
||||
[186] = "%1d", -- AMPCD PB 4
|
||||
[187] = "%1d", -- AMPCD PB 5
|
||||
[188] = "%1d", -- AMPCD PB 6
|
||||
[189] = "%1d", -- AMPCD PB 7
|
||||
[190] = "%1d", -- AMPCD PB 8
|
||||
[191] = "%1d", -- AMPCD PB 9
|
||||
[192] = "%1d", -- AMPCD PB 10
|
||||
[193] = "%1d", -- AMPCD PB 11
|
||||
[194] = "%1d", -- AMPCD PB 12
|
||||
[195] = "%1d", -- AMPCD PB 13
|
||||
[196] = "%1d", -- AMPCD PB 14
|
||||
[197] = "%1d", -- AMPCD PB 15
|
||||
[198] = "%1d", -- AMPCD PB 16
|
||||
[199] = "%1d", -- AMPCD PB 17
|
||||
[200] = "%1d", -- AMPCD PB 18
|
||||
[201] = "%1d", -- AMPCD PB 19
|
||||
[202] = "%1d", -- AMPCD PB 20
|
||||
-- Instruments --------------------------
|
||||
-- Standby Pressure Altimeter AAU-52/A
|
||||
[224] = "%.2f", -- AAU-52 Altimeter Pressure Setting Knob {0.0,1.0} in 0.04 Steps
|
||||
-- Radar Altimeter Height Indicator
|
||||
[291] = "%.2f", -- Push to Test Switch, (MW) rotate clockwise to apply power and set low altitude index pointer {0.0,1.0} in 0.1 Steps
|
||||
[292] = "%1d", -- Push to Test Switch, (LMB) activate BIT checks
|
||||
[213] = "%1d", -- SAI Cage Knob, (LMB) Pull to cage
|
||||
[214] = "%.2f", -- SAI Cage Knob, (MW) Adjust miniature airplane {0.0,1.0} in 0.1 Steps
|
||||
[215] = "%1d", -- SAI Test Button - Push to test
|
||||
-- Integrated Fuel/Engine Indicator (IFEI)
|
||||
[168] = "%1d", -- IFEI Mode Button
|
||||
[169] = "%1d", -- IFEI QTY Button
|
||||
[170] = "%1d", -- IFEI Up Arrow Button
|
||||
[171] = "%1d", -- IFEI Down Arrow Button
|
||||
[172] = "%1d", -- IFEI ZONE Button
|
||||
[173] = "%1d", -- IFEI ET Button
|
||||
[174] = "%.2f", -- IFEI Brightness Control Knob {0.0,1.0} in 0.1 Steps
|
||||
-- Sensor panel
|
||||
[440] = "%.1f", -- RADAR Switch (MW to pull), OFF/STBY/OPR/EMERG(PULL) {0.0,1.0} {0.0,0.1,0.2,0.3}
|
||||
[443] = "%.1f", -- INS Switch, OFF/CV/GND/NAV/IFA/GYRO/GB/TEST {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7}
|
||||
-- UFC
|
||||
[128] = "%1d", -- UFC Function Selector Pushbutton, A/P
|
||||
[129] = "%1d", -- UFC Function Selector Pushbutton, IFF
|
||||
[130] = "%1d", -- UFC Function Selector Pushbutton, TCN
|
||||
[131] = "%1d", -- UFC Function Selector Pushbutton, ILS
|
||||
[132] = "%1d", -- UFC Function Selector Pushbutton, D/L
|
||||
[133] = "%1d", -- UFC Function Selector Pushbutton, BCN
|
||||
[134] = "%1d", -- UFC Function Selector Pushbutton, ON/OFF
|
||||
[100] = "%1d", -- UFC Option Select Pushbutton 1
|
||||
[101] = "%1d", -- UFC Option Select Pushbutton 2
|
||||
[102] = "%1d", -- UFC Option Select Pushbutton 3
|
||||
[103] = "%1d", -- UFC Option Select Pushbutton 4
|
||||
[106] = "%1d", -- UFC Option Select Pushbutton 5
|
||||
[111] = "%1d", -- UFC Keyboard Pushbutton, 1
|
||||
[112] = "%1d", -- UFC Keyboard Pushbutton, 2
|
||||
[113] = "%1d", -- UFC Keyboard Pushbutton, 3
|
||||
[114] = "%1d", -- UFC Keyboard Pushbutton, 4
|
||||
[115] = "%1d", -- UFC Keyboard Pushbutton, 5
|
||||
[116] = "%1d", -- UFC Keyboard Pushbutton, 6
|
||||
[117] = "%1d", -- UFC Keyboard Pushbutton, 7
|
||||
[118] = "%1d", -- UFC Keyboard Pushbutton, 8
|
||||
[119] = "%1d", -- UFC Keyboard Pushbutton, 9
|
||||
[120] = "%1d", -- UFC Keyboard Pushbutton, 0
|
||||
[121] = "%1d", -- UFC Keyboard Pushbutton, CLR
|
||||
[122] = "%1d", -- UFC Keyboard Pushbutton, ENT
|
||||
[99] = "%1d", -- UFC I/P Pushbutton
|
||||
[110] = "%1d", -- UFC Emission Control Pushbutton
|
||||
[107] = "%1d", -- UFC ADF Function Select Switch, 1/OFF/2 {-1.0,0.0,1.0}
|
||||
[108] = "%.2f", -- UFC COMM 1 Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[123] = "%.2f", -- UFC COMM 2 Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[109] = "%.2f", -- UFC Brightness Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[125] = "%1d", -- UFC COMM 1 Channel Selector Knob
|
||||
[124] = "%.2f", -- UFC COMM 1 Channel Selector Knob {0.0,1.0} in 0.2 Steps
|
||||
[127] = "%1d", -- UFC COMM 2 Channel Selector Knob
|
||||
[126] = "%.2f", -- UFC COMM 2 Channel Selector Knob {0.0,1.0} in 0.2 Steps
|
||||
-- intercom
|
||||
[357] = "%.2f", -- VOX Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[358] = "%.2f", -- ICS Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[359] = "%.2f", -- RWR Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[360] = "%.2f", -- WPN Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[361] = "%.2f", -- MIDS B Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[362] = "%.2f", -- MIDS A Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[363] = "%.2f", -- TACAN Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[364] = "%.2f", -- AUX Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[350] = "%1d", -- Comm Relay Switch, CIPHER/OFF/PLAIN {-1.0,0.0,1.0}
|
||||
[351] = "%1d", -- COMM G XMT Switch, COMM 1/OFF/COMM 2 {-1.0,0.0,1.0}
|
||||
[356] = "%1d", -- IFF Master Switch, EMER/NORM
|
||||
[355] = "%1d", -- IFF Mode 4 Switch, DIS/AUD /DIS/OFF {-1.0,0.0,1.0}
|
||||
[354] = "%1d", -- CRYPTO Switch, HOLD/NORM/ZERO {-1.0,0.0,1.0}
|
||||
[353] = "%1d", -- ILS UFC/MAN Switch, UFC/MAN
|
||||
[352] = "%.2f", -- ILS Channel Selector Switch {0.0,0.05,0.10,0.15,0.20,0.25,0.30,0.35,0.40,0.45,0.50,0.55,0.60,0.65,0.70,0.75,0.80,0.85,0.90,0.95}
|
||||
[230] = "%1d", -- Warning Tone Silence Button - Push to silence
|
||||
-- KY-58
|
||||
[444] = "%.1f", -- KY-58 Mode Select Knob, P/C/LD/RV {0.0,0.1,0.2,0.3}
|
||||
[445] = "%.2f", -- KY-58 Volume Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[446] = "%.1f", -- KY-58 Fill Select Knob, Z 1-5/1/2/3/4/5/6/Z ALL {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7}
|
||||
[447] = "%.1f", -- KY-58 Power Select Knob, OFF/ON/TD {0.0,0.1,0.2}
|
||||
-- antenna selector
|
||||
[373] = "%1d", -- COMM 1 Antenna Selector Switch, UPPER/AUTO/LOWER {-1.0,0.0,1.0}
|
||||
[374] = "%1d", -- IFF Antenna Selector Switch, UPPER/BOTH/LOWER {-1.0,0.0,1.0}
|
||||
-- RWR
|
||||
[277] = "%1d", -- ALR-67 POWER Pushbutton
|
||||
[275] = "%1d", -- ALR-67 DISPLAY Pushbutton
|
||||
[272] = "%1d", -- ALR-67 SPECIAL Pushbutton
|
||||
[269] = "%1d", -- ALR-67 OFFSET Pushbutton
|
||||
[266] = "%1d", -- ALR-67 BIT Pushbutton
|
||||
[263] = "%.2f", -- ALR-67 DMR Control Knob {0.0,1.0} in 0.1 Steps
|
||||
[262] = "%.2f", -- ALR-67 AUDIO Control Knob (no function){0.0,1.0} in 0.1 Steps
|
||||
[261] = "%.1f", -- ALR-67 DIS TYPE Switch, N/I/A/U/F {0.0,0.1,0.2,0.3,0.4}
|
||||
[216] = "%.2f", -- ALR-67 RWR Intensity Knob {0.0,1.0} in 0.1 Steps
|
||||
-- CMDS
|
||||
[380] = "%1d", -- Dispense Button - Push to dispense flares and chaff
|
||||
[517] = "%.1f", -- DISPENSER Switch, BYPASS/ON/OFF {0.0,0.1,0.2}
|
||||
[515] = "%1d", -- ECM JETT JETT SEL Button - Push to jettison
|
||||
-- ICMCP
|
||||
[248] = "%.1f", -- ECM Mode Switch, XMIT/REC/BIT/STBY/OFF {0.0,0.1,0.2,0.3,0.4}
|
||||
-- Helmet
|
||||
[136] = "%.2f", -- HMD OFF/BRT Knob {0.0,0.75} in 0.01 Steps
|
||||
-- Targeting Pod, FLIR
|
||||
[439] = "%.1f", -- FLIR Switch, ON/STBY/OFF {0.0,0.5,1.0}
|
||||
[441] = "%.1f", -- LTD/R Switch, ARM/SAFE/AFT {0.0,0.5,1.0}
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) <- special function for get frequency data
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000), 2) -- export to Hardware '2' Config
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) <- special function for get frequency data
|
||||
]]
|
||||
|
||||
--ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
|
||||
-- IFEI - Engine, Fuel and Clock informations
|
||||
local lEngineFuelClock = ExportScript.Tools.getListIndicatorValue(5)
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog('EngineFuelClock: '..ExportScript.Tools.dump(lEngineFuelClock))
|
||||
end
|
||||
|
||||
if lEngineFuelClock ~= nil and lEngineFuelClock.txt_RPM_R ~= nil then
|
||||
-- Engine informations 3 character
|
||||
ExportScript.Tools.SendData(2000, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_RPM_R, 3)) -- right RPM
|
||||
ExportScript.Tools.SendData(2001, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_RPM_L, 3)) -- left RPM
|
||||
ExportScript.Tools.SendData(2002, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_TEMP_R, 3)) -- right TEMP
|
||||
ExportScript.Tools.SendData(2003, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_TEMP_L, 3)) -- left TEMP
|
||||
ExportScript.Tools.SendData(2004, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_FF_R, 3)) -- right Fuel flow
|
||||
ExportScript.Tools.SendData(2005, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_FF_L, 3)) -- left Fuel flow
|
||||
ExportScript.Tools.SendData(2006, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_OilPress_R, 3)) -- right OilPress
|
||||
ExportScript.Tools.SendData(2007, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_OilPress_L, 3)) -- left OilPress
|
||||
|
||||
-- Fuel informations 6 character
|
||||
ExportScript.Tools.SendData(2008, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_FUEL_UP, 6)) -- up Fuel
|
||||
ExportScript.Tools.SendData(2009, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_FUEL_DOWN, 6)) -- down Fuel
|
||||
ExportScript.Tools.SendData(2010, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_BINGO, 6)) -- BINGO
|
||||
|
||||
-- Clock 8 character
|
||||
ExportScript.Tools.SendData(2011, ExportScript.Tools.DisplayFormat(string.format("%s¦%s¦%s", lEngineFuelClock.txt_CLOCK_H, lEngineFuelClock.txt_CLOCK_M, lEngineFuelClock.txt_CLOCK_S), 8)) -- Clock HH:MM:SS
|
||||
else
|
||||
-- Engine informations 3 character
|
||||
ExportScript.Tools.SendData(2000, " ") -- right RPM
|
||||
ExportScript.Tools.SendData(2001, " ") -- left RPM
|
||||
ExportScript.Tools.SendData(2002, " ") -- right TEMP
|
||||
ExportScript.Tools.SendData(2003, " ") -- left TEMP
|
||||
ExportScript.Tools.SendData(2004, " ") -- right Fuel flow
|
||||
ExportScript.Tools.SendData(2005, " ") -- left Fuel flow
|
||||
ExportScript.Tools.SendData(2006, " ") -- right OilPress
|
||||
ExportScript.Tools.SendData(2007, " ") -- left OilPress
|
||||
|
||||
-- Fuel informations 6 character
|
||||
ExportScript.Tools.SendData(2008, " ") -- up Fuel
|
||||
ExportScript.Tools.SendData(2009, " ") -- down Fuel
|
||||
ExportScript.Tools.SendData(2010, " ") -- BINGO
|
||||
|
||||
-- Clock 8 character
|
||||
ExportScript.Tools.SendData(2011, " ") -- Clock HH:MM:SS
|
||||
end
|
||||
|
||||
-- UFC Displays
|
||||
local lUFCDisplays = ExportScript.Tools.getListIndicatorValue(6)
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog('UFC: '..ExportScript.Tools.dump(lUFCDisplays))
|
||||
end
|
||||
|
||||
if lUFCDisplays ~= nil and lUFCDisplays.UFC_MainDummy ~= nil then
|
||||
-- ScratchPadString Displays
|
||||
lUFCDisplays.UFC_ScratchPadString1Display = string.gsub(lUFCDisplays.UFC_ScratchPadString1Display, "_", "-") -- fix weil das ein - sein sollte
|
||||
lUFCDisplays.UFC_ScratchPadString2Display = string.gsub(lUFCDisplays.UFC_ScratchPadString2Display, "_", "-") -- fix weil das ein - sein sollte
|
||||
lUFCDisplays.UFC_ScratchPadString1Display = string.gsub(lUFCDisplays.UFC_ScratchPadString1Display, "~", "2") -- fix weil das eine 2 sein sollte
|
||||
lUFCDisplays.UFC_ScratchPadString2Display = string.gsub(lUFCDisplays.UFC_ScratchPadString2Display, "~", "2") -- fix weil das eine 2 sein sollte
|
||||
lUFCDisplays.UFC_ScratchPadString1Display = string.gsub(lUFCDisplays.UFC_ScratchPadString1Display, "`", "1") -- fix weil das eine 1 sein sollte
|
||||
lUFCDisplays.UFC_ScratchPadString2Display = string.gsub(lUFCDisplays.UFC_ScratchPadString2Display, "`", "1") -- fix weil das eine 1 sein sollte
|
||||
ExportScript.Tools.SendData(2020, ExportScript.Tools.DisplayFormat(lUFCDisplays.UFC_ScratchPadString1Display, 2)) -- ScratchPadString1Display 2 character
|
||||
ExportScript.Tools.SendData(2021, ExportScript.Tools.DisplayFormat(lUFCDisplays.UFC_ScratchPadString2Display, 2)) -- ScratchPadString2Display 2 character
|
||||
ExportScript.Tools.SendData(2022, ExportScript.Tools.DisplayFormat(lUFCDisplays.UFC_ScratchPadNumberDisplay, 7)) -- ScratchPadNumberDisplay 7 character
|
||||
|
||||
local lTmpCueing = " "
|
||||
-- Option Displays
|
||||
lTmpCueing = (#lUFCDisplays.UFC_OptionCueing1 > 0 and "¦" or " ")
|
||||
ExportScript.Tools.SendData(2023, ExportScript.Tools.DisplayFormat(lTmpCueing..lUFCDisplays.UFC_OptionDisplay1)) -- OptionDisplay1 5 character
|
||||
lTmpCueing = (#lUFCDisplays.UFC_OptionCueing2 > 0 and "¦" or " ")
|
||||
ExportScript.Tools.SendData(2024, ExportScript.Tools.DisplayFormat(lTmpCueing..lUFCDisplays.UFC_OptionDisplay2)) -- OptionDisplay2 5 character
|
||||
lTmpCueing = (#lUFCDisplays.UFC_OptionCueing3 > 0 and "¦" or " ")
|
||||
ExportScript.Tools.SendData(2025, ExportScript.Tools.DisplayFormat(lTmpCueing..lUFCDisplays.UFC_OptionDisplay3)) -- OptionDisplay3 5 character
|
||||
lTmpCueing = (#lUFCDisplays.UFC_OptionCueing4 > 0 and "¦" or " ")
|
||||
ExportScript.Tools.SendData(2026, ExportScript.Tools.DisplayFormat(lTmpCueing..lUFCDisplays.UFC_OptionDisplay4)) -- OptionDisplay4 5 character
|
||||
lTmpCueing = (#lUFCDisplays.UFC_OptionCueing5 > 0 and "¦" or " ")
|
||||
ExportScript.Tools.SendData(2027, ExportScript.Tools.DisplayFormat(lTmpCueing..lUFCDisplays.UFC_OptionDisplay5)) -- OptionDisplay5 5 character
|
||||
|
||||
-- Comm Displays
|
||||
lUFCDisplays.UFC_Comm1Display = string.gsub(lUFCDisplays.UFC_Comm1Display, "~", "2") -- fix weil das eine 2 sein sollte
|
||||
lUFCDisplays.UFC_Comm2Display = string.gsub(lUFCDisplays.UFC_Comm2Display, "~", "2") -- fix weil das eine 2 sein sollte
|
||||
lUFCDisplays.UFC_Comm1Display = string.gsub(lUFCDisplays.UFC_Comm1Display, "`", "1") -- fix weil das eine 1 sein sollte
|
||||
lUFCDisplays.UFC_Comm2Display = string.gsub(lUFCDisplays.UFC_Comm2Display, "`", "1") -- fix weil das eine 1 sein sollte
|
||||
ExportScript.Tools.SendData(2028, ExportScript.Tools.DisplayFormat(lUFCDisplays.UFC_Comm1Display, 2)) -- Comm1Display 2 character
|
||||
ExportScript.Tools.SendData(2029, ExportScript.Tools.DisplayFormat(lUFCDisplays.UFC_Comm2Display, 2)) -- Comm2Display 2 character
|
||||
else
|
||||
-- ScratchPadString Displays
|
||||
ExportScript.Tools.SendData(2020, " ") -- ScratchPadString1Display 2 character
|
||||
ExportScript.Tools.SendData(2021, " ") -- ScratchPadString2Display 2 character
|
||||
ExportScript.Tools.SendData(2022, " ") -- ScratchPadNumberDisplay 7 character
|
||||
|
||||
-- Option Displays
|
||||
ExportScript.Tools.SendData(2023, " ") -- OptionDisplay1 5 character
|
||||
ExportScript.Tools.SendData(2024, " ") -- OptionDisplay2 5 character
|
||||
ExportScript.Tools.SendData(2025, " ") -- OptionDisplay3 5 character
|
||||
ExportScript.Tools.SendData(2026, " ") -- OptionDisplay4 5 character
|
||||
ExportScript.Tools.SendData(2027, " ") -- OptionDisplay5 5 character
|
||||
|
||||
-- Comm Displays
|
||||
ExportScript.Tools.SendData(2028, " ") -- Comm1Display 2 character
|
||||
ExportScript.Tools.SendData(2029, " ") -- Comm2Display 2 character
|
||||
end
|
||||
|
||||
local lUHF1Radio = GetDevice(38)
|
||||
ExportScript.Tools.SendData(2030, ExportScript.Tools.DisplayFormat(ExportScript.Tools.RoundFreqeuncy((lUHF1Radio:get_frequency()/1000000))), 7)
|
||||
|
||||
local lUHF2Radio = GetDevice(39)
|
||||
ExportScript.Tools.SendData(2031, ExportScript.Tools.DisplayFormat(ExportScript.Tools.RoundFreqeuncy((lUHF2Radio:get_frequency()/1000000), "7.3", false, 0.005)), 7)
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000), 2) -- export to Hardware '2' Config
|
||||
]]
|
||||
|
||||
-- IFEI - Engine, Fuel and Clock informations
|
||||
local lEngineFuelClock = ExportScript.Tools.getListIndicatorValue(5)
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog('EngineFuelClock: '..ExportScript.Tools.dump(lEngineFuelClock))
|
||||
end
|
||||
|
||||
if lEngineFuelClock ~= nil and lEngineFuelClock.txt_RPM_R ~= nil then
|
||||
-- Engine informations 3 character
|
||||
ExportScript.Tools.SendDataDAC(2000, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_RPM_R, 3, "r", true)) -- right RPM
|
||||
ExportScript.Tools.SendDataDAC(2001, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_RPM_L, 3, "r", true)) -- left RPM
|
||||
ExportScript.Tools.SendDataDAC(2002, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_TEMP_R, 3, "r", true)) -- right TEMP
|
||||
ExportScript.Tools.SendDataDAC(2003, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_TEMP_L, 3, "r", true)) -- left TEMP
|
||||
ExportScript.Tools.SendDataDAC(2004, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_FF_R, 3, "r", true)) -- right Fuel flow
|
||||
ExportScript.Tools.SendDataDAC(2005, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_FF_L, 3, "r", true)) -- left Fuel flow
|
||||
ExportScript.Tools.SendDataDAC(2006, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_OilPress_R, 3, "r", true)) -- right OilPress
|
||||
ExportScript.Tools.SendDataDAC(2007, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_OilPress_L, 3, "r", true)) -- left OilPress
|
||||
|
||||
-- Fuel informations 6 character
|
||||
ExportScript.Tools.SendDataDAC(2008, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_FUEL_UP:match("%d+"), 6, "r", true)) -- up Fuel
|
||||
ExportScript.Tools.SendDataDAC(2009, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_FUEL_DOWN:match("%d+"), 6, "r", true)) -- down Fuel
|
||||
ExportScript.Tools.SendDataDAC(2010, ExportScript.Tools.DisplayFormat(lEngineFuelClock.txt_BINGO:match("%d+"), 6, "r", true)) -- BINGO
|
||||
|
||||
-- Clock 8 character
|
||||
ExportScript.Tools.SendDataDAC(2011, ExportScript.Tools.DisplayFormat(string.format("%s.%s.$s", lEngineFuelClock.txt_CLOCK_H, lEngineFuelClock.txt_CLOCK_M, lEngineFuelClock.txt_CLOCK_S)), 8, "r", true) -- Clock HH:MM:SS
|
||||
else
|
||||
-- Engine informations 3 character
|
||||
ExportScript.Tools.SendDataDAC(2000, "-") -- right RPM
|
||||
ExportScript.Tools.SendDataDAC(2001, "-") -- left RPM
|
||||
ExportScript.Tools.SendDataDAC(2002, "-") -- right TEMP
|
||||
ExportScript.Tools.SendDataDAC(2003, "-") -- left TEMP
|
||||
ExportScript.Tools.SendDataDAC(2004, "-") -- right Fuel flow
|
||||
ExportScript.Tools.SendDataDAC(2005, "-") -- left Fuel flow
|
||||
ExportScript.Tools.SendDataDAC(2006, "-") -- right OilPress
|
||||
ExportScript.Tools.SendDataDAC(2007, "-") -- left OilPress
|
||||
|
||||
-- Fuel informations 5 character
|
||||
ExportScript.Tools.SendDataDAC(2008, "-") -- up Fuel
|
||||
ExportScript.Tools.SendDataDAC(2009, "-") -- down Fuel
|
||||
ExportScript.Tools.SendDataDAC(2010, "-") -- BINGO
|
||||
|
||||
-- Clock 8 character
|
||||
ExportScript.Tools.SendDataDAC(2011, "-") -- Clock HH:MM:SS
|
||||
end
|
||||
|
||||
local lUHF1Radio = GetDevice(39)
|
||||
ExportScript.Tools.SendDataDAC(2030, ExportScript.Tools.DisplayFormat(ExportScript.Tools.RoundFreqeuncy((lUHF1Radio:get_frequency()/1000000))), 7)
|
||||
|
||||
local lUHF2Radio = GetDevice(40)
|
||||
ExportScript.Tools.SendDataDAC(2031, ExportScript.Tools.DisplayFormat(ExportScript.Tools.RoundFreqeuncy((lUHF2Radio:get_frequency()/1000000), "7.3", false, 0.005)), 7)
|
||||
|
||||
--=====================================================================================
|
||||
--[[
|
||||
ExportScript.Tools.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 13, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
--ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 73, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
@@ -1,5 +1,6 @@
|
||||
-- Flaming Cliffs Auxiliary Functons
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.Version.FC_AuxiliaryFunctions = "1.2.1"
|
||||
|
||||
-- Workaround for engine start-up
|
||||
ExportScript.AF.LeftEngineOn = false
|
||||
@@ -625,7 +626,7 @@ function ExportScript.AF.FC_Russian_RadarAltimeter_1000m(warningflag)
|
||||
ExportScript.Tools.SendData(28, lDangerRALT_Lamp)
|
||||
end
|
||||
|
||||
-- Barometric Altimeter for SU-25A, SU25-T
|
||||
-- Barometric Altimeter for SU-33
|
||||
function ExportScript.AF.FC_Russian_BarometricAltimeter_late()
|
||||
|
||||
local lBasicAtmospherePressure = LoGetBasicAtmospherePressure() -- BAROMETRIC PRESSURE (mm Hg)
|
||||
@@ -635,6 +636,42 @@ function ExportScript.AF.FC_Russian_BarometricAltimeter_late()
|
||||
|
||||
lAltBar = lAltBar - ((9.5 * (760 - lBasicAtmospherePressure)) / 2) -- 9.5 m per 1mmHg difference
|
||||
|
||||
lBasicAtmospherePressure = lBasicAtmospherePressure * 1.33322 -- mmHg to hPa
|
||||
|
||||
-- if lAltBar > 10000 then
|
||||
-- lAltBar_kilometer_needle = lAltBar / 100000
|
||||
-- else
|
||||
lAltBar_kilometer_needle = lAltBar / 10000
|
||||
-- end
|
||||
-- if lAltBar > 1000 then
|
||||
-- lAltBar_meter_needle = lAltBar / 1000
|
||||
-- lAltBar_meter_needle = lAltBar_meter_needle - ExportScript.Tools.round(lAltBar_meter_needle, 0, "floor")
|
||||
-- else
|
||||
lAltBar_meter_needle = lAltBar / 1000
|
||||
-- end
|
||||
lAltBar = lAltBar / 1000
|
||||
|
||||
-- AltBar_kilometer_needle {0.0,1.0}
|
||||
-- AltBar_meter_needle {0.0,1.0}
|
||||
-- BasicAtmospherePressure {947, 1080} hPa
|
||||
-- AltBar_kilometer {0, 99} km
|
||||
|
||||
ExportScript.Tools.SendData(30, string.format("%.4f", lAltBar_kilometer_needle))
|
||||
ExportScript.Tools.SendData(31, string.format("%.4f", lAltBar_meter_needle))
|
||||
ExportScript.Tools.SendData(32, string.format("%04d", ExportScript.Tools.round(lBasicAtmospherePressure, 0, "floor")))
|
||||
ExportScript.Tools.SendData(33, string.format("%02d", ExportScript.Tools.round(lAltBar, 0, "floor")))
|
||||
end
|
||||
|
||||
-- Barometric Altimeter for SU-25A, SU25-T
|
||||
function ExportScript.AF.FC_Russian_BarometricAltimeter_late_special()
|
||||
|
||||
local lBasicAtmospherePressure = LoGetBasicAtmospherePressure() -- BAROMETRIC PRESSURE (mm Hg)
|
||||
local lAltBar = LoGetAltitudeAboveSeaLevel() -- ALTITUDE SEA LEVEL (Meter)
|
||||
local lAltBar_kilometer_needle = 0
|
||||
local lAltBar_meter_needle = 0
|
||||
|
||||
lAltBar = lAltBar - ((9.5 * (760 - lBasicAtmospherePressure)) / 2) -- 9.5 m per 1mmHg difference
|
||||
|
||||
-- if lAltBar > 10000 then
|
||||
-- lAltBar_kilometer_needle = lAltBar / 100000
|
||||
-- else
|
||||
@@ -650,16 +687,16 @@ function ExportScript.AF.FC_Russian_BarometricAltimeter_late()
|
||||
|
||||
-- AltBar_kilometer_needle {0.0,1.0}
|
||||
-- AltBar_meter_needle {0.0,1.0}
|
||||
-- BasicAtmospherePressure {600.0, 800.0}
|
||||
-- AltBar_kilometer {0.0, 99.9}
|
||||
-- BasicAtmospherePressure {600, 780} mm Hg
|
||||
-- AltBar_kilometer {0, 99} km
|
||||
|
||||
ExportScript.Tools.SendData(30, string.format("%.4f", lAltBar_kilometer_needle))
|
||||
ExportScript.Tools.SendData(31, string.format("%.4f", lAltBar_meter_needle))
|
||||
ExportScript.Tools.SendData(32, string.format("%.4f", lBasicAtmospherePressure))
|
||||
ExportScript.Tools.SendData(33, string.format("%.4f", lAltBar))
|
||||
ExportScript.Tools.SendData(32, string.format("%04d", ExportScript.Tools.round(lBasicAtmospherePressure, 0, "floor")))
|
||||
ExportScript.Tools.SendData(33, string.format("%02d", ExportScript.Tools.round(lAltBar, 0, "floor")))
|
||||
end
|
||||
|
||||
-- Barometric Altimeter for SU-27, SU-33
|
||||
-- Barometric Altimeter for SU-27
|
||||
function ExportScript.AF.FC_Russian_BarometricAltimeter_20000()
|
||||
|
||||
local lBasicAtmospherePressure = LoGetBasicAtmospherePressure() -- BAROMETRIC PRESSURE (mm Hg)
|
||||
@@ -1265,6 +1302,13 @@ function ExportScript.AF.FC_Russian_AOA_MiG29()
|
||||
|
||||
local lAoA = LoGetAngleOfAttack() -- ANGLE OF ATTACK AoA (Radian)
|
||||
local lAccelerationUnits = LoGetAccelerationUnits().y -- G-LOAD
|
||||
|
||||
if ExportScript.AF.TmpAOAMiG29GLoadMin == nil then
|
||||
ExportScript.AF.TmpAOAMiG29GLoadMin = 0
|
||||
end
|
||||
if ExportScript.AF.TmpAOAMiG29GLoadMax == nil then
|
||||
ExportScript.AF.TmpAOAMiG29GLoadMax = 0
|
||||
end
|
||||
|
||||
if lAoA > 0.0 then -- positive AOA
|
||||
--[[
|
||||
@@ -1333,9 +1377,18 @@ function ExportScript.AF.FC_Russian_AOA_MiG29()
|
||||
]]
|
||||
lAccelerationUnits = 0.09672619047619047619047619047619 * lAccelerationUnits
|
||||
end
|
||||
|
||||
if lAccelerationUnits > ExportScript.AF.TmpAOAMiG29GLoadMax then
|
||||
ExportScript.AF.TmpAOAMiG29GLoadMax = lAccelerationUnits
|
||||
end
|
||||
if lAccelerationUnits < ExportScript.AF.TmpAOAMiG29GLoadMin then
|
||||
ExportScript.AF.TmpAOAMiG29GLoadMin = lAccelerationUnits
|
||||
end
|
||||
|
||||
ExportScript.Tools.SendData(50, string.format("%.4f", lAoA))
|
||||
ExportScript.Tools.SendData(51, string.format("%.4f", lAccelerationUnits))
|
||||
ExportScript.Tools.SendData(52, string.format("%.4f", ExportScript.AF.TmpAOAMiG29GLoadMin))
|
||||
ExportScript.Tools.SendData(53, string.format("%.4f", ExportScript.AF.TmpAOAMiG29GLoadMax))
|
||||
end
|
||||
|
||||
-- Russian Clock ACS-1 for KA-50, SU-25A, MIG-29A , MIG-29S
|
||||
@@ -1401,7 +1454,7 @@ function ExportScript.AF.FC_Russian_Clock_late()
|
||||
ExportScript.Tools.SendData(55, string.format("%.4f", lCurrentHours))
|
||||
ExportScript.Tools.SendData(56, string.format("%.4f", lCurrentMinutes))
|
||||
ExportScript.Tools.SendData(57, string.format("%.4f", lCurrentSeconds))
|
||||
ExportScript.Tools.SendData(58, lDefaultNull) -- red/white flag
|
||||
--ExportScript.Tools.SendData(58, lDefaultNull) -- red/white flag
|
||||
ExportScript.Tools.SendData(59, string.format("%.4f", lFlightTimeHours))
|
||||
ExportScript.Tools.SendData(60, string.format("%.4f", lFlightTimeMinutes))
|
||||
ExportScript.Tools.SendData(61, string.format("%.4f", lCurrentSeconds))
|
||||
@@ -1455,6 +1508,29 @@ function ExportScript.AF.FC_Russian_EGT_1000gc(egttemp, exportid)
|
||||
ExportScript.Tools.SendData(lExportID, string.format("%.4f", lEGTtemp))
|
||||
end
|
||||
|
||||
-- US Standby Compass for MiG-29A/S/G
|
||||
function ExportScript.AF.FC_Russian_Compass2()
|
||||
local lDefaultNull = 0.0
|
||||
local lHeading = math.deg(LoGetSelfData().Heading) -- HEADING (Radian to Grad)
|
||||
--local lHeading = math.deg(LoGetMagneticYaw()) -- HEADING (Radian to Grad)
|
||||
--ExportScript.Tools.WriteToLog('lHeading: '..ExportScript.Tools.dump(lHeading))
|
||||
local lPitch = LoGetSelfData().Pitch -- Pitch
|
||||
local lBank = LoGetSelfData().Bank -- Bank
|
||||
|
||||
if lHeading <= 180 then
|
||||
lHeading = lHeading / 180
|
||||
else
|
||||
lHeading = (lHeading / 180) - 2
|
||||
end
|
||||
|
||||
lPitch = lPitch / 1.31 -- korrektur der maximal Werte
|
||||
lBank = lBank / 6.26 -- korrektur der maximal Werte
|
||||
|
||||
ExportScript.Tools.SendData(67, string.format("%.4f", lHeading)) -- heading
|
||||
ExportScript.Tools.SendData(68, string.format("%.4f", lPitch)) -- pitch
|
||||
ExportScript.Tools.SendData(69, string.format("%.4f", lBank)) -- bank
|
||||
end
|
||||
|
||||
-- Russian Mechanical Device Indicator for SU-25A+T
|
||||
function ExportScript.AF.FC_Russian_MDI_SU25(FunctionTyp)
|
||||
local lFunctionTyp = FunctionTyp or "Ikarus"
|
||||
@@ -1574,7 +1650,7 @@ function ExportScript.AF.FC_Russian_FlareChaff_MiG29(FunctionTyp)
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
|
||||
ExportScript.Tools.SendDataDAC(800, lSnares.chaff + lSnares.flare )
|
||||
ExportScript.Tools.SendData(800, lSnares.chaff + lSnares.flare )
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1586,6 +1662,20 @@ function ExportScript.AF.FuelQuantityIndicator_MiG29(FunctionTyp)
|
||||
if lEngineInfo == nil then
|
||||
return
|
||||
end
|
||||
|
||||
local lPayloadInfo = LoGetPayloadInfo()
|
||||
local lRange = 0
|
||||
local lStation5Tank = false
|
||||
local lStation6Tank = false
|
||||
local lStation7Tank = false
|
||||
|
||||
if lEngineInfo ~= nil then
|
||||
lStation5Tank = (lPayloadInfo.Stations[5].CLSID == "{C0FF4842-FBAC-11d5-9190-00A0249B6F00}" and true or false)
|
||||
lStation6Tank = (lPayloadInfo.Stations[6].CLSID == "{C0FF4842-FBAC-11d5-9190-00A0249B6F00}" and true or false)
|
||||
lStation7Tank = (lPayloadInfo.Stations[7].CLSID == "{2BEC576B-CDF5-4B7F-961F-B0FA4312B841}" and true or false)
|
||||
end
|
||||
|
||||
--ExportScript.Tools.WriteToLog('lStation7Tank: '..ExportScript.Tools.dump(lStation7Tank))
|
||||
--ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
--[[
|
||||
[fuel_external] = number: "0"
|
||||
@@ -1616,89 +1706,88 @@ function ExportScript.AF.FuelQuantityIndicator_MiG29(FunctionTyp)
|
||||
local lTotalFuel = lEngineInfo.fuel_internal + lEngineInfo.fuel_external
|
||||
--ExportScript.Tools.WriteToLog('lTotalFuel: '..ExportScript.Tools.dump(lTotalFuel))
|
||||
|
||||
-- Fuel value correction, difference 3D cockpit gauges and export value
|
||||
-- 3000kg = 2740 1,10
|
||||
-- 2500kg = 2260 <- Lamp 2 1,11
|
||||
-- 1000kg = 890 1,12
|
||||
-- 800kg = 700 <- Lamp 3 1,14
|
||||
-- 650kg = 550 <- Lamp 4 1,18
|
||||
if lTotalFuel > 2740 then
|
||||
lTotalFuel = lTotalFuel * 1.1
|
||||
elseif lTotalFuel > 2260 and lTotalFuel < 2740 then
|
||||
lTotalFuel = lTotalFuel * 1.11
|
||||
elseif lTotalFuel > 890 and lTotalFuel < 2260 then
|
||||
lTotalFuel = lTotalFuel * 1.12
|
||||
elseif lTotalFuel > 700 and lTotalFuel < 290 then
|
||||
lTotalFuel = lTotalFuel * 1.14
|
||||
elseif lTotalFuel > 0 and lTotalFuel < 700 then
|
||||
lTotalFuel = lTotalFuel * 1.18
|
||||
end
|
||||
-- Internal Fuel: 3370
|
||||
-- max external Fuel: 2930
|
||||
-- max totak Fuel: 6300
|
||||
-- 1400 Liter center tank = 1163kg, station 7, CLSID {2BEC576B-CDF5-4B7F-961F-B0FA4312B841}
|
||||
-- 1150 Liter tank = 891kg, station 5,6, CLSID {C0FF4842-FBAC-11d5-9190-00A0249B6F00}
|
||||
--lEngineInfo.fuel_external < 1770 -- Tank warning 1
|
||||
--lEngineInfo.fuel_external == 0 -- Tank warning 2
|
||||
--lEngineInfo.fuel_internal < 2500 -- Tank warning 3
|
||||
--lEngineInfo.fuel_internal < 800 -- Tank warning 4
|
||||
--lEngineInfo.fuel_internal < 650 -- Tank warning 5
|
||||
|
||||
if ExportScript.Config.DACExport and lFunctionTyp == "DAC" then
|
||||
ExportScript.Tools.SendDataDAC("300", string.format("%d", ExportScript.Tools.round(((lTotalFuel) / 10), 0, "ceil") * 10) ) -- total fuel in kg
|
||||
|
||||
ExportScript.Tools.SendDataDAC("304", (lTotalFuel < 3800.0 and 1 or 0) ) -- Tank warning 1
|
||||
ExportScript.Tools.SendDataDAC("305", (lTotalFuel < 2550.0 and 1 or 0) ) -- Tank warning 2
|
||||
ExportScript.Tools.SendDataDAC("306", (lTotalFuel < 800.0 and 1 or 0) ) -- Tank warning 3
|
||||
ExportScript.Tools.SendDataDAC("307", (lTotalFuel < 650.0 and 1 or 0) ) -- Tank warning 4
|
||||
if lStation7Tank and (lStation5Tank or lStation6Tank) then
|
||||
ExportScript.Tools.SendDataDAC("304", (lEngineInfo.fuel_external < 1770.0 and 1 or 0) ) -- Tank warning 1
|
||||
ExportScript.Tools.SendDataDAC("305", (lEngineInfo.fuel_external < 1.0 and 1 or 0) ) -- Tank warning 2
|
||||
elseif lStation7Tank and not(lStation5Tank or lStation6Tank) then
|
||||
ExportScript.Tools.SendDataDAC("304", (lEngineInfo.fuel_external < 1.0 and 1 or 0) ) -- Tank warning 1
|
||||
ExportScript.Tools.SendDataDAC("305", 0 ) -- Tank warning 2
|
||||
end
|
||||
ExportScript.Tools.SendDataDAC("306", (lEngineInfo.fuel_internal < 2500.0 and 1 or 0) ) -- Tank warning 3
|
||||
ExportScript.Tools.SendDataDAC("307", (lEngineInfo.fuel_internal < 800.0 and 1 or 0) ) -- Tank warning 4
|
||||
ExportScript.Tools.SendDataDAC("308", (lEngineInfo.fuel_internal < 650.0 and 1 or 0) ) -- Tank warning 5
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
|
||||
local lTotalFuel_5_4 = 0
|
||||
local lTotalFuel_4_0 = 0
|
||||
local lTotalFuel_7_5 = 0
|
||||
local lTotalFuel_5_0 = 0
|
||||
|
||||
if lTotalFuel < 5500 then
|
||||
if lTotalFuel > 4000 then
|
||||
--[[
|
||||
y_min = 0.0 -- minimaler Ausgabewert
|
||||
y_max = 1.0 -- maximaler Ausgabewert
|
||||
x_min = 4000 -- minimaler Eingangswert
|
||||
x_max = 5500 -- maximaler Eingangswert
|
||||
if lTotalFuel > 5000 then -- internal and external
|
||||
--[[
|
||||
y_min = 0.0 -- minimaler Ausgabewert
|
||||
y_max = 1.0 -- maximaler Ausgabewert
|
||||
x_min = 5000 -- minimaler Eingangswert
|
||||
x_max = 7500 -- maximaler Eingangswert
|
||||
|
||||
x = 5000 -- aktueller Eingangswert
|
||||
x = 6300 -- aktueller Eingangswert
|
||||
|
||||
d_y = 1 -- Delta Ausgabewerte (y_max - y_min)
|
||||
d_x = 1500 -- Delta Eingangswerte (x_max - x_min)
|
||||
m = 0.00066667 -- Steigung der linearen Funktion (d_y / d_x)
|
||||
n = -2.666685 -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
|
||||
d_y = 1 -- Delta Ausgabewerte (y_max - y_min)
|
||||
d_x = 2500 -- Delta Eingangswerte (x_max - x_min)
|
||||
m = 0.0004 -- Steigung der linearen Funktion (d_y / d_x)
|
||||
n = -2.0 -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
|
||||
|
||||
y = 0.666665 -- Ergebnis (m * x + n)
|
||||
]]
|
||||
lTotalFuel_5_4 = 0.00066667 * lTotalFuel + -2.666685
|
||||
else
|
||||
lTotalFuel_5_4 = 0.0
|
||||
end
|
||||
y = 0.52 -- Ergebnis (m * x + n)
|
||||
]]
|
||||
lTotalFuel_7_5 = 0.0004 * lTotalFuel + -2.0
|
||||
lTotalFuel_5_0 = 1
|
||||
else
|
||||
lTotalFuel_5_4 = 1.0
|
||||
end
|
||||
if lTotalFuel < 4000 then
|
||||
--[[
|
||||
y_min = 0.0 -- minimaler Ausgabewert
|
||||
y_max = 1.0 -- maximaler Ausgabewert
|
||||
x_min = 0 -- minimaler Eingangswert
|
||||
x_max = 4000 -- maximaler Eingangswert
|
||||
x_max = 5000 -- maximaler Eingangswert
|
||||
|
||||
x = 3000 -- aktueller Eingangswert
|
||||
x = 3500 -- aktueller Eingangswert
|
||||
|
||||
d_y = 1.0 -- Delta Ausgabewerte (y_max - y_min)
|
||||
d_x = 4000 -- Delta Eingangswerte (x_max - x_min)
|
||||
m = 0.00025 -- Steigung der linearen Funktion (d_y / d_x)
|
||||
d_y = 1 -- Delta Ausgabewerte (y_max - y_min)
|
||||
d_x = 5000 -- Delta Eingangswerte (x_max - x_min)
|
||||
m = 0.0002 -- Steigung der linearen Funktion (d_y / d_x)
|
||||
n = 0.0 -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
|
||||
|
||||
y = 0.75 -- Ergebnis (m * x + n)
|
||||
y = 0.52 -- Ergebnis (m * x + n)
|
||||
]]
|
||||
lTotalFuel_4_0 = 0.00025 * lTotalFuel
|
||||
else
|
||||
lTotalFuel_4_0 = 1.0
|
||||
lTotalFuel_5_0 = 0.0002 * lTotalFuel + 0
|
||||
lTotalFuel_7_5 = 0
|
||||
end
|
||||
|
||||
ExportScript.Tools.SendData(301, string.format("%0.4f", lTotalFuel_5_4) )
|
||||
ExportScript.Tools.SendData(302, string.format("%0.4f", lTotalFuel_4_0) )
|
||||
ExportScript.Tools.SendData(301, string.format("%0.4f", lTotalFuel_7_5) )
|
||||
ExportScript.Tools.SendData(302, string.format("%0.4f", lTotalFuel_5_0) )
|
||||
|
||||
ExportScript.Tools.SendData(304, (lTotalFuel < 3800.0 and 1 or 0) ) -- Tank warning 1
|
||||
ExportScript.Tools.SendData(305, (lTotalFuel < 2550.0 and 1 or 0) ) -- Tank warning 2
|
||||
ExportScript.Tools.SendData(306, (lTotalFuel < 800.0 and 1 or 0) ) -- Tank warning 3
|
||||
ExportScript.Tools.SendData(307, (lTotalFuel < 650.0 and 1 or 0) ) -- Tank warning 4
|
||||
if lStation7Tank and (lStation5Tank or lStation6Tank) then
|
||||
ExportScript.Tools.SendData(304, (lEngineInfo.fuel_external < 1770.0 and 1 or 0) ) -- Tank warning 1
|
||||
ExportScript.Tools.SendData(305, (lEngineInfo.fuel_external < 1.0 and 1 or 0) ) -- Tank warning 2
|
||||
elseif lStation7Tank and not(lStation5Tank or lStation6Tank) then
|
||||
ExportScript.Tools.SendData(304, (lEngineInfo.fuel_external < 1.0 and 1 or 0) ) -- Tank warning 1
|
||||
ExportScript.Tools.SendData(305, 0 ) -- Tank warning 2
|
||||
end
|
||||
ExportScript.Tools.SendData(306, (lEngineInfo.fuel_internal < 2500.0 and 1 or 0) ) -- Tank warning 3
|
||||
ExportScript.Tools.SendData(307, (lEngineInfo.fuel_internal < 800.0 and 1 or 0) ) -- Tank warning 4
|
||||
ExportScript.Tools.SendData(308, (lEngineInfo.fuel_internal < 650.0 and 1 or 0) ) -- Tank warning 4
|
||||
ExportScript.Tools.SendData(303, lRange ) -- Range in km
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1881,9 +1970,9 @@ function ExportScript.AF.FC_US_ADI()
|
||||
[25] = "%0.1f", -- ADI Attitude Warning Flag
|
||||
[19] = "%0.1f", -- ADI Course Warning Flag
|
||||
]]
|
||||
lNavInfoPitch = lNavInfoPitch / (lRadToDCSsignd * -1) -- lNavInfoPitch / lRadToDCSsignd
|
||||
lNavInfoPitch = lNavInfoPitch / (lRadToDCSsignd * -1) --lNavInfoPitch / lRadToDCSsignd
|
||||
lNavInfoRoll = lNavInfoRoll / lRadToDCSsignd
|
||||
lPitch = lPitch / (lRadToDCSsignd / 2) -- lPitch / (lRadToDCSsignd / 1.5)
|
||||
lPitch = lPitch / (lRadToDCSsignd / 2) --lPitch / (lRadToDCSsignd / 1.5)
|
||||
lBank = lBank / lRadToDCSsignd
|
||||
|
||||
ExportScript.Tools.SendData(2, string.format("%.4f", ExportScript.Tools.negate(lPitch))) -- negate
|
||||
@@ -1927,6 +2016,9 @@ function ExportScript.AF.FC_US_HSI(distancetoway)
|
||||
local lHSI_ADF = LoGetControlPanel_HSI().ADF_raw -- ADF OBS (Radian)
|
||||
local lHSI_Curse = LoGetControlPanel_HSI().Course -- HSI Course (Radian)
|
||||
local lHeading = LoGetSelfData().Heading -- HEADING (Radian)
|
||||
local lCourseDeviation = LoGetControlPanel_HSI().CourseDeviation
|
||||
--ExportScript.Tools.WriteToLog('LoGetControlPanel_HSI() 1: '..ExportScript.Tools.dump(LoGetControlPanel_HSI()))
|
||||
|
||||
lPitch, lBank = nil
|
||||
--[[
|
||||
[Course] = number: "0.76548692098835"
|
||||
@@ -1979,6 +2071,8 @@ function ExportScript.AF.FC_US_HSI(distancetoway)
|
||||
lHeading = 1.0 - (lHeading / lRadToDCSunsignd)
|
||||
lHSI_Curse = (lHSI_Curse / lRadToDCSunsignd)
|
||||
lHSI_ADF = (lHSI_ADF / lRadToDCSunsignd)
|
||||
lCourseDeviation = (lCourseDeviation > 1.0 and 1 or lCourseDeviation)
|
||||
lCourseDeviation = (lCourseDeviation < -1.0 and -1 or lCourseDeviation)
|
||||
-- HSI Heading {0.0, 1.0}
|
||||
-- HSI Bearing #1 {0.0, 1.0}
|
||||
-- HSI Bearing #2 {0.0, 1.0}
|
||||
@@ -1999,7 +2093,7 @@ function ExportScript.AF.FC_US_HSI(distancetoway)
|
||||
ExportScript.Tools.SendData(13, string.format("%.4f", lHSI_Curse)) -- Bearing #2
|
||||
ExportScript.Tools.SendData(14, lDefaultNull)
|
||||
ExportScript.Tools.SendData(15, string.format("%.4f", lHSI_Curse))
|
||||
ExportScript.Tools.SendData(16, string.format("%.4f", lHSI_ADF))
|
||||
ExportScript.Tools.SendData(16, string.format("%.4f", lCourseDeviation))
|
||||
ExportScript.Tools.SendData(17, string.format("%.4f", lRangeCounter1))
|
||||
ExportScript.Tools.SendData(18, string.format("%.4f", lRangeCounter2))
|
||||
ExportScript.Tools.SendData(19, string.format("%.4f", lRangeCounter3))
|
||||
@@ -2127,6 +2221,8 @@ function ExportScript.AF.FC_US_Compass()
|
||||
local lHeading = math.deg(LoGetSelfData().Heading) -- HEADING (Radian to Grad)
|
||||
--local lHeading = math.deg(LoGetMagneticYaw()) -- HEADING (Radian to Grad)
|
||||
--lHeading = 360 - lHeading -- muss umgerechnet werden??
|
||||
local lPitch = LoGetSelfData().Pitch -- Pitch
|
||||
local lBank = LoGetSelfData().Bank -- Bank
|
||||
|
||||
--[[
|
||||
y_min = 1.0 -- minimaler Ausgabewert
|
||||
@@ -2144,9 +2240,9 @@ function ExportScript.AF.FC_US_Compass()
|
||||
]]
|
||||
lHeading = -0.00555555555555555555555555555556 * lHeading + 1.0
|
||||
|
||||
ExportScript.Tools.SendData(31, string.format("%.4f", lHeading)) -- heading
|
||||
ExportScript.Tools.SendData(32, string.format("%.4f", lDefaultNull)) -- pitch
|
||||
ExportScript.Tools.SendData(33, string.format("%.4f", lDefaultNull)) -- bank
|
||||
ExportScript.Tools.SendData(31, string.format("%.4f", lHeading)) -- heading
|
||||
ExportScript.Tools.SendData(32, string.format("%.4f", lDefaultNull)) -- bank
|
||||
ExportScript.Tools.SendData(33, string.format("%.4f", lDefaultNull)) -- pitch
|
||||
end
|
||||
|
||||
-- US F-15C Exaust Gas Temperature
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- FW-190D9 Dora
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.FW190D9 = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
|
||||
@@ -0,0 +1,727 @@
|
||||
-- J-11A Export
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.J11A = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
|
||||
-----------------------------------------
|
||||
-- FLAMING CLIFFS AIRCRAFT / J-11A --
|
||||
-- FC aircraft don't support GetDevice --
|
||||
-----------------------------------------
|
||||
|
||||
function ExportScript.ProcessIkarusFCHighImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
local myData = LoGetSelfData()
|
||||
|
||||
if (myData) then
|
||||
local lLatitude = myData.LatLongAlt.Lat -- LATITUDE
|
||||
local lLongitude = myData.LatLongAlt.Long -- LONGITUDE
|
||||
|
||||
local lEngineTempLeft = LoGetEngineInfo().Temperature.left -- ENG1 EGT ºC
|
||||
local lEngineTempRight = LoGetEngineInfo().Temperature.right -- ENG2 EGT ºC
|
||||
--[[
|
||||
local lBasicAtmospherePressure = LoGetBasicAtmospherePressure() -- BAROMETRIC PRESSURE
|
||||
local lAltBar = LoGetAltitudeAboveSeaLevel() -- ALTITUDE SEA LEVEL (Meter)
|
||||
local lAltRad = LoGetAltitudeAboveGroundLevel() -- ALTITUDE GROUND LEVEL (Meter)
|
||||
local lTrueAirSpeed = LoGetTrueAirSpeed() -- TRUE AIRSPEED (Meter/Second)
|
||||
local lPitch, lBank, lYaw = LoGetADIPitchBankYaw() -- PITCH, BANK, YAW (Radian)
|
||||
|
||||
local lHeading = myData.Heading -- HEADING (Radian)
|
||||
local lVVI = LoGetVerticalVelocity() -- VERTICAL SPEED (Meter/Second)
|
||||
local lIAS = LoGetIndicatedAirSpeed() -- INDICATED AIRSPEED (Meter/Second)
|
||||
local lMachNumber = LoGetMachNumber() -- MACH
|
||||
local lAoA = LoGetAngleOfAttack() -- ANGLE OF ATTACK AoA (Radian)
|
||||
|
||||
local lGlide = LoGetGlideDeviation() -- VOR1 HORIZONTAL DEFLECTION (-1 +1)
|
||||
local lSide = LoGetSideDeviation() -- VOR1 VERTICAL DEFLECTION (-1 +1)
|
||||
local lSlipBallPosition = LoGetSlipBallPosition() -- SLIP BALL (-1 +1)
|
||||
local lAccelerationUnits = LoGetAccelerationUnits().y -- G-LOAD
|
||||
|
||||
local lNavInfoPitch = LoGetNavigationInfo().Requirements.pitch -- AP REQUIRED PITCH (Radian)
|
||||
local lNavInfoRoll = LoGetNavigationInfo().Requirements.roll -- AP REQUIRED BANK (Radian)
|
||||
local lNavInfoSpeed = LoGetNavigationInfo().Requirements.speed -- AP SPEED (Meter/Second)
|
||||
local lNavInfoAltitude = LoGetNavigationInfo().Requirements.altitude -- AP ALTITUDE (Meter)
|
||||
local lNavInfoVerticalSpeed = LoGetNavigationInfo().Requirements.vertical_speed -- AP VERTICAL SPEED (Meter/Second)
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI() -- HSI Data
|
||||
local lHSI_RMI = LoGetControlPanel_HSI().RMI_raw -- VOR1 OBS (Radian)
|
||||
local lHSI_ADF = LoGetControlPanel_HSI().ADF_raw -- ADF OBS (Radian)
|
||||
local lHSI_Heading = LoGetControlPanel_HSI().Heading_raw -- Heading (Radian)
|
||||
|
||||
local lEngineRPMleft = LoGetEngineInfo().RPM.left -- ENG1 RPM %
|
||||
local lEngineRPMright = LoGetEngineInfo().RPM.right -- ENG2 RPM %
|
||||
local lEngineFuelInternal = LoGetEngineInfo().fuel_internal -- TANK1 (INT) (KG)
|
||||
local lEngineFuelExternal = LoGetEngineInfo().fuel_external -- TANK2 (EXT) (KG)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
local lPayloadInfo = LoGetPayloadInfo() -- Paylod, e.g. bombs, guns, rockets, fuel tanks,...
|
||||
]]
|
||||
|
||||
local lDistanceToWay = 999
|
||||
local lRoute = LoGetRoute()
|
||||
|
||||
if (myData and lRoute) then -- if neither are nil
|
||||
local myLoc = LoGeoCoordinatesToLoCoordinates(lLongitude, lLatitude)
|
||||
--lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.y - lRoute.goto_point.world_point.y)^2)
|
||||
lDistanceToWay = math.sqrt((myLoc.x - lRoute.goto_point.world_point.x)^2 + (myLoc.z - lRoute.goto_point.world_point.z)^2)
|
||||
end
|
||||
|
||||
-- IAS-MACH Indicator
|
||||
ExportScript.AF.FC_Russian_AirSpeed_1600hkm()
|
||||
|
||||
-- AOA Indicator and Accelerometer (AOA, GLoad)
|
||||
ExportScript.AF.FC_Russian_AOA_Su2733()
|
||||
|
||||
-- ADI
|
||||
ExportScript.AF.FC_Russian_ADI_Old()
|
||||
|
||||
-- HSI
|
||||
ExportScript.AF.FC_Russian_HSI(lDistanceToWay)
|
||||
|
||||
-- Vertical Velocity Indicator (VVI)
|
||||
ExportScript.AF.FC_Russian_VVI_Old()
|
||||
|
||||
-- Radar Altimeter (below 100m is warning light on)
|
||||
ExportScript.AF.FC_Russian_RadarAltimeter_1500m(100)
|
||||
|
||||
-- Barometric Altimeter
|
||||
ExportScript.AF.FC_Russian_BarometricAltimeter_20000()
|
||||
|
||||
-- Tachometer (RPM)
|
||||
ExportScript.AF.FC_Russian_EngineRPM()
|
||||
|
||||
-- Left Jet Engine Turbine Temperature Indicator (EngineTemp, main scala, second scala, ExportID)
|
||||
ExportScript.AF.FC_TwoNeedlesGauge(lEngineTempLeft, 1200, 100, 70, 71)
|
||||
|
||||
-- Right Jet Engine Turbine Temperature Indicator (EngineTemp, main scala, second scala, ExportID)
|
||||
ExportScript.AF.FC_TwoNeedlesGauge(lEngineTempRight, 1200, 100, 72, 73)
|
||||
|
||||
-- Clock from Ka-50
|
||||
ExportScript.AF.FC_Russian_Clock_late()
|
||||
else
|
||||
ExportScript.Tools.WriteToLog("Unknown FC Error, no LoGetSelfData.")
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
|
||||
-- your script
|
||||
|
||||
end
|
||||
|
||||
function ExportScript.ProcessIkarusFCLowImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
|
||||
ExportScript.AF.FC_WeaponPanel_SU27(lFunctionTyp)
|
||||
|
||||
-- SPO15 Radar Warning Reciver
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
|
||||
-- EKRAN Message
|
||||
ExportScript.AF.FC_EKRAN()
|
||||
|
||||
-- Fuel Quantity Indicator
|
||||
ExportScript.AF.FuelQuantityIndicator(lFunctionTyp)
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo ~= nil then
|
||||
--ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
-- Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.left, 240, 85)
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 86)
|
||||
end
|
||||
|
||||
-- Engine Lamps, Start and Afterburner
|
||||
ExportScript.AF.FC_EngineLamps_SU2733(lFunctionTyp)
|
||||
|
||||
-- Mechanical Configuration Indicator
|
||||
ExportScript.AF.MechanicalDevicesIndicator(lFunctionTyp)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
if lMechInfo ~= nil then
|
||||
-- Wheelbrakes Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 87)
|
||||
|
||||
-- Wheelbrakes Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 88)
|
||||
|
||||
--ExportScript.Tools.WriteToLog('lMechInfo.noseflap.value: '..ExportScript.Tools.dump(lMechInfo.noseflap.value)) -- Vorfluegel, Balkenanzeige neben dem Radarhoehenmesser (0=oben bis 30=unten)
|
||||
end
|
||||
|
||||
-- Airintake
|
||||
ExportScript.AF.FC_Russian_AirIntake()
|
||||
|
||||
--[[
|
||||
local lPayloadInfo = LoGetPayloadInfo()
|
||||
ExportScript.Tools.WriteToLog('lPayloadInfo: '..ExportScript.Tools.dump(lPayloadInfo))
|
||||
|
||||
local lSnares = LoGetSnares() -- Flare and Chaff
|
||||
ExportScript.Tools.WriteToLog('lSnares: '..ExportScript.Tools.dump(lSnares))
|
||||
|
||||
local lSightingSystemInfo = LoGetSightingSystemInfo()
|
||||
ExportScript.Tools.WriteToLog('lSightingSystemInfo: '..ExportScript.Tools.dump(lSightingSystemInfo))
|
||||
|
||||
local lTWSInfo = LoGetTWSInfo() -- SPO Informationen, z.B. Radarwarner F15C
|
||||
ExportScript.Tools.WriteToLog('lTWSInfo: '..ExportScript.Tools.dump(lTWSInfo))
|
||||
|
||||
local lTargetInformation = LoGetTargetInformation() -- detalierte Radar Infos z.B. F15C
|
||||
ExportScript.Tools.WriteToLog('lTargetInformation: '..ExportScript.Tools.dump(lTargetInformation))
|
||||
|
||||
local lLockedTargetInformation = LoGetLockedTargetInformation()
|
||||
ExportScript.Tools.WriteToLog('lLockedTargetInformation: '..ExportScript.Tools.dump(lLockedTargetInformation))
|
||||
|
||||
local lF15_TWS_Contacs = LoGetF15_TWS_Contacts() -- the same information but only for F-15 in TWS mode
|
||||
ExportScript.Tools.WriteToLog('lF15_TWS_Contacs: '..ExportScript.Tools.dump(lF15_TWS_Contacs))
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
ExportScript.Tools.WriteToLog('lMechInfo: '..ExportScript.Tools.dump(lMechInfo))
|
||||
|
||||
local lMCPState = LoGetMCPState() -- Warnlichter
|
||||
ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
|
||||
local lControlPanel_HSI = LoGetControlPanel_HSI()
|
||||
ExportScript.Tools.WriteToLog('lControlPanel_HSI: '..ExportScript.Tools.dump(lControlPanel_HSI))
|
||||
|
||||
local lRadioBeaconsStatus = LoGetRadioBeaconsStatus()
|
||||
ExportScript.Tools.WriteToLog('lRadioBeaconsStatus: '..ExportScript.Tools.dump(lRadioBeaconsStatus))
|
||||
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
]]
|
||||
-- Weapon Control System
|
||||
--local lNameByType = LoGetNameByType () -- args 4 (number : level1,level2,level3,level4), result string
|
||||
-- values from LoGetTargetInformation().type
|
||||
--ExportScript.Tools.WriteToLog('lNameByType: '..ExportScript.Tools.dump(lNameByType))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance()
|
||||
local lFunctionTyp = "DAC" -- function type for shared function
|
||||
|
||||
ExportScript.AF.FC_WeaponPanel_SU27(lFunctionTyp)
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
ExportScript.AF.MechanicalDevicesIndicator(lFunctionTyp)
|
||||
ExportScript.AF.FuelQuantityIndicator(lFunctionTyp)
|
||||
ExportScript.AF.FC_EngineLamps_SU2733(lFunctionTyp)
|
||||
ExportScript.AF.StatusLamp()
|
||||
ExportScript.AF.SightingSystem()
|
||||
ExportScript.AF.PPDSPPanel()
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
|
||||
function ExportScript.AF.SightingSystem()
|
||||
local lSightingSystemInfo = LoGetSightingSystemInfo()
|
||||
if lSightingSystemInfo == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lSightingSystemInfo: '..ExportScript.Tools.dump(lSightingSystemInfo)9
|
||||
--[[
|
||||
[PRF] = {
|
||||
[selection] = string: "ILV"
|
||||
[current] = string: "MED"
|
||||
}
|
||||
[laser_on] = boolean: "false"
|
||||
[scale] = {
|
||||
[azimuth] = number: "0.52359873056412"
|
||||
[distance] = number: "10000"
|
||||
}
|
||||
[radar_on] = boolean: "false"
|
||||
[optical_system_on] = boolean: "false"
|
||||
[LaunchAuthorized] = boolean: "false"
|
||||
[ECM_on] = boolean: "false"
|
||||
[Manufacturer] = string: "RUS"
|
||||
[TDC] = {
|
||||
[y] = number: "0"
|
||||
[x] = number: "0"
|
||||
}
|
||||
[ScanZone] = {
|
||||
[coverage_H] = {
|
||||
[min] = number: "0"
|
||||
[max] = number: "20000"
|
||||
}
|
||||
[size] = {
|
||||
[azimuth] = number: "1.0471974611282"
|
||||
[elevation] = number: "0.17453290522099"
|
||||
}
|
||||
[position] = {
|
||||
[exceeding_manual] = number: "0"
|
||||
[distance_manual] = number: "0"
|
||||
[azimuth] = number: "0"
|
||||
[elevation] = number: "0"
|
||||
}
|
||||
}
|
||||
]]
|
||||
ExportScript.Tools.SendDataDAC("600", lSightingSystemInfo.ECM_on == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("601", lSightingSystemInfo.laser_on == true and 1 or 0 )
|
||||
--ExportScript.Tools.SendDataDAC("602", lSightingSystemInfo.optical_system_on == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("603", lSightingSystemInfo.LaunchAuthorized == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("604", lSightingSystemInfo.radar_on == true and 1 or 0 )
|
||||
end
|
||||
|
||||
function ExportScript.AF.PPDSPPanel()
|
||||
local lSnares = LoGetSnares() -- Flare and Chaff
|
||||
if lSnares == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lSnares: '..ExportScript.Tools.dump(lSnares))
|
||||
|
||||
--[chaff] = number: "96"
|
||||
--[flare] = number: "96"
|
||||
|
||||
local lChaffLED = ExportScript.Tools.round(lSnares.chaff / 12, 0, "ceil") + 1
|
||||
local lFlareLED = ExportScript.Tools.round(lSnares.flare / 12, 0, "ceil") + 1
|
||||
|
||||
ExportScript.Tools.SendDataDAC("800", (lChaffLED <= 1 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("801", (lChaffLED <= 2 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("802", (lChaffLED <= 3 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("803", (lChaffLED <= 4 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("804", (lChaffLED <= 5 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("805", (lChaffLED <= 6 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("806", (lChaffLED <= 7 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("807", (lChaffLED <= 8 and 0 or 1) )
|
||||
|
||||
ExportScript.Tools.SendDataDAC("810", (lFlareLED <= 1 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("811", (lFlareLED <= 2 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("812", (lFlareLED <= 3 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("813", (lFlareLED <= 4 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("814", (lFlareLED <= 5 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("815", (lFlareLED <= 6 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("816", (lFlareLED <= 7 and 0 or 1) )
|
||||
ExportScript.Tools.SendDataDAC("817", (lFlareLED <= 8 and 0 or 1) )
|
||||
end
|
||||
|
||||
function ExportScript.AF.StatusLamp()
|
||||
local lMCPState = LoGetMCPState() -- Warning Lights
|
||||
if lMCPState == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lMCPState: '..ExportScript.Tools.dump(lMCPState))
|
||||
--[[
|
||||
[RightTailPlaneFailure] = boolean: "false"
|
||||
[EOSFailure] = boolean: "false"
|
||||
[ECMFailure] = boolean: "false"
|
||||
[RightAileronFailure] = boolean: "false"
|
||||
[MasterWarning] = boolean: "false"
|
||||
[RightEngineFailure] = boolean: "false"
|
||||
[CannonFailure] = boolean: "false"
|
||||
[MLWSFailure] = boolean: "false"
|
||||
[ACSFailure] = boolean: "false"
|
||||
[RadarFailure] = boolean: "false"
|
||||
[HelmetFailure] = boolean: "false"
|
||||
[HUDFailure] = boolean: "false"
|
||||
[LeftMainPumpFailure] = boolean: "false"
|
||||
[RightWingPumpFailure] = boolean: "false"
|
||||
[LeftWingPumpFailure] = boolean: "false"
|
||||
[MFDFailure] = boolean: "false"
|
||||
[RWSFailure] = boolean: "false"
|
||||
[GearFailure] = boolean: "false"
|
||||
[HydraulicsFailure] = boolean: "false"
|
||||
[AutopilotFailure] = boolean: "true"
|
||||
[FuelTankDamage] = boolean: "false"
|
||||
[LeftAileronFailure] = boolean: "false"
|
||||
[CanopyOpen] = boolean: "false"
|
||||
[RightMainPumpFailure] = boolean: "false"
|
||||
[StallSignalization] = boolean: "false"
|
||||
[LeftEngineFailure] = boolean: "false"
|
||||
[AutopilotOn] = boolean: "false"
|
||||
[LeftTailPlaneFailure] = boolean: "false"
|
||||
]]
|
||||
|
||||
ExportScript.Tools.SendDataDAC("700", lMCPState.LeftTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("701", lMCPState.RightTailPlaneFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("702", lMCPState.MasterWarning == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("703", lMCPState.LeftEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("704", lMCPState.RightEngineFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("705", lMCPState.LeftAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("706", lMCPState.RightAileronFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("707", lMCPState.LeftMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("708", lMCPState.RightMainPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("709", lMCPState.LeftWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("710", lMCPState.RightWingPumpFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("711", lMCPState.EOSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("712", lMCPState.ECMFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("713", lMCPState.CannonFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("714", lMCPState.MLWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("715", lMCPState.ACSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("716", lMCPState.RadarFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("717", lMCPState.HelmetFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("718", lMCPState.HUDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("719", lMCPState.MFDFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("720", lMCPState.RWSFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("721", lMCPState.GearFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("722", lMCPState.HydraulicsFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("723", lMCPState.AutopilotFailure == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("724", lMCPState.FuelTankDamage == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("725", lMCPState.CanopyOpen == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("726", lMCPState.StallSignalization == true and 1 or 0 )
|
||||
ExportScript.Tools.SendDataDAC("727", lMCPState.AutopilotOn == true and 1 or 0 )
|
||||
|
||||
local lAccelerationUnits = LoGetAccelerationUnits()
|
||||
if lAccelerationUnits ~= nil then
|
||||
--ExportScript.Tools.WriteToLog('lAccelerationUnits: '..ExportScript.Tools.dump(lAccelerationUnits))
|
||||
ExportScript.Tools.SendDataDAC("732", (lAccelerationUnits.y > 8.0 and 1 or 0) ) -- lamp Over-G warning
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.AF.FuelQuantityIndicator(FunctionTyp)
|
||||
local lFunctionTyp = FunctionTyp or "Ikarus"
|
||||
-- Fuel quantity shows the fuel remaining in all tanks
|
||||
local lEngineInfo = LoGetEngineInfo()
|
||||
if lEngineInfo == nil then
|
||||
return
|
||||
end
|
||||
--ExportScript.Tools.WriteToLog('lEngineInfo: '..ExportScript.Tools.dump(lEngineInfo))
|
||||
--[[
|
||||
[fuel_external] = number: "0"
|
||||
[Temperature] = {
|
||||
[left] = number: "626.99444580078"
|
||||
[right] = number: "626.99444580078"
|
||||
}
|
||||
[RPM] = {
|
||||
[left] = number: "87.453765869141"
|
||||
[right] = number: "87.453758239746"
|
||||
}
|
||||
[FuelConsumption] = {
|
||||
[left] = number: "0.1500396137767"
|
||||
[right] = number: "0.1500396137767"
|
||||
}
|
||||
[fuel_internal] = number: "3773.2749023438"
|
||||
[EngineStart] = {
|
||||
[left] = number: "0"
|
||||
[right] = number: "0"
|
||||
}
|
||||
[HydraulicPressure] = {
|
||||
[left] = number: "210"
|
||||
[right] = number: "210"
|
||||
}
|
||||
lPayloadInfo.Stations[8].CLSID == E8D4652F-FD48-45B7-BA5B-2AE05BB5A9CF -- ext 800l Fuel Tank
|
||||
]]
|
||||
|
||||
if ExportScript.Config.DACExport and lFunctionTyp == "DAC" then
|
||||
ExportScript.Tools.SendDataDAC("300", string.format("%d", ExportScript.Tools.round((lEngineInfo.fuel_internal / 10), 0, "ceil") * 10) ) -- total fuel in kg
|
||||
--ExportScript.Tools.SendDataDAC("301", string.format("%d", lEngineInfo.fuel_internal)) -- total fuel in kg
|
||||
--ExportScript.Tools.SendDataDAC("302", string.format("%d", lEngineInfo.fuel_external)) -- external fuel in kg
|
||||
|
||||
ExportScript.Tools.SendDataDAC("304", (lEngineInfo.fuel_internal < 5600.0 and 1 or 0) ) -- Tank warning 1
|
||||
ExportScript.Tools.SendDataDAC("305", (lEngineInfo.fuel_internal < 4500.0 and 1 or 0) ) -- Tank warning 2
|
||||
ExportScript.Tools.SendDataDAC("306", (lEngineInfo.fuel_internal < 1500.0 and 1 or 0) ) -- Tank warning 3
|
||||
ExportScript.Tools.SendDataDAC("307", (lEngineInfo.fuel_internal < 800.0 and 1 or 0) ) -- Tank warning 4
|
||||
ExportScript.Tools.SendDataDAC("308", (lEngineInfo.fuel_internal < 600.0 and 1 or 0) ) -- Bingo Fuel
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
|
||||
local lTotalFuel_9_3 = 0
|
||||
local lTotalFuel_5_0 = 0
|
||||
local lTotalFuel = lEngineInfo.fuel_internal
|
||||
|
||||
if lTotalFuel < 9000 then
|
||||
if lTotalFuel > 3000 then
|
||||
--[[
|
||||
y_min = 0.0 -- minimaler Ausgabewert
|
||||
y_max = 1.0 -- maximaler Ausgabewert
|
||||
x_min = 3000 -- minimaler Eingangswert
|
||||
x_max = 9000 -- maximaler Eingangswert
|
||||
x = 8000 -- aktueller Eingangswert
|
||||
|
||||
d_y = 1 -- Delta Ausgabewerte (y_max - y_min)
|
||||
d_x = 6000 -- Delta Eingangswerte (x_max - x_min)
|
||||
m = 1.66666666666666666666666666667e-4 -- Steigung der linearen Funktion (d_y / d_x)
|
||||
n = -0,5 -- Schnittpunkt der Funktion mit y-Achse (y_max - m * x_max)
|
||||
|
||||
y = 0.83333 -- Ergebnis (m * x + n)
|
||||
]]
|
||||
lTotalFuel_9_3 = 1.6666666666666666666666666666667e-4 * lTotalFuel + -0.5
|
||||
else
|
||||
lTotalFuel_9_3 = 0.0
|
||||
end
|
||||
else
|
||||
lTotalFuel_9_3 = 1.0
|
||||
end
|
||||
if lTotalFuel < 5000 then
|
||||
lTotalFuel_5_0 = lTotalFuel / 5000
|
||||
else
|
||||
lTotalFuel_5_0 = 1.0
|
||||
end
|
||||
|
||||
-- TotalFuel_5_0
|
||||
-- TotalFuel_9_3
|
||||
-- Light1
|
||||
-- Light2
|
||||
-- Light3
|
||||
-- Light4
|
||||
-- BingoLight
|
||||
ExportScript.Tools.SendData(300, lTotalFuel_5_0)
|
||||
ExportScript.Tools.SendData(301, lTotalFuel_9_3)
|
||||
ExportScript.Tools.SendData(302, (lEngineInfo.fuel_internal < 5600.0 and 1 or 0)) -- Tank warning 1
|
||||
ExportScript.Tools.SendData(303, (lEngineInfo.fuel_internal < 4500.0 and 1 or 0)) -- Tank warning 2
|
||||
ExportScript.Tools.SendData(304, (lEngineInfo.fuel_internal < 1500.0 and 1 or 0)) -- Tank warning 3
|
||||
ExportScript.Tools.SendData(305, (lEngineInfo.fuel_internal < 800.0 and 1 or 0)) -- Tank warning 4
|
||||
ExportScript.Tools.SendData(306, (lEngineInfo.fuel_internal < 600.0 and 1 or 0)) -- Bingo Fuel
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.AF.MechanicalDevicesIndicator(FunctionTyp)
|
||||
local lFunctionTyp = FunctionTyp or "Ikarus"
|
||||
-- The mechanical devices indicator shows the position of the landing gear, flaps, leading edge flaps and airbrake
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
--ExportScript.Tools.WriteToLog('lMechInfo: '..ExportScript.Tools.dump(lMechInfo))
|
||||
if lMechInfo == nil then
|
||||
return
|
||||
end
|
||||
--[[
|
||||
[hook] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[parachute] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[controlsurfaces] = {
|
||||
[eleron] = {
|
||||
[left] = number: "0"
|
||||
[right] = number: "-0.21084336936474"
|
||||
}
|
||||
[elevator] = {
|
||||
[left] = number: "-0"
|
||||
[right] = number: "-0"
|
||||
}
|
||||
[rudder] = {
|
||||
[left] = number: "0"
|
||||
[right] = number: "0"
|
||||
}
|
||||
}
|
||||
[airintake] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[canopy] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[refuelingboom] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[wing] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[noseflap] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[gear] = {
|
||||
[value] = number: "0"
|
||||
[nose] = {
|
||||
[rod] = number: "0"
|
||||
}
|
||||
[main] = {
|
||||
[left] = {
|
||||
[rod] = number: "0"
|
||||
}
|
||||
[right] = {
|
||||
[rod] = number: "0"
|
||||
}
|
||||
}
|
||||
[status] = number: "0"
|
||||
}
|
||||
[speedbrakes] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[wheelbrakes] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}
|
||||
[flaps] = {
|
||||
[status] = number: "0"
|
||||
[value] = number: "0"
|
||||
}]]
|
||||
--local lTrueAirSpeed = LoGetTrueAirSpeed()
|
||||
--ExportScript.Tools.WriteToLog('lTrueAirSpeed: '..ExportScript.Tools.dump(lTrueAirSpeed))
|
||||
|
||||
if ExportScript.Config.DACExport and lFunctionTyp == "DAC" then
|
||||
ExportScript.Tools.SendDataDAC("500", (((lMechInfo.gear.status == 1 and lMechInfo.gear.value < 1) or (lMechInfo.gear.status == 0 and lMechInfo.gear.value > 0)) and 1 or 0 ) ) -- gear warning light
|
||||
ExportScript.Tools.SendDataDAC("501", (lMechInfo.gear.value > 0.85 and 1 or 0) ) -- nose gear
|
||||
ExportScript.Tools.SendDataDAC("502", (lMechInfo.gear.value > 0.95 and 1 or 0) ) -- left gear
|
||||
ExportScript.Tools.SendDataDAC("503", (lMechInfo.gear.value > 0.97 and 1 or 0) ) -- right gear
|
||||
|
||||
ExportScript.Tools.SendDataDAC("510", (lMechInfo.speedbrakes.value > 0.1 and 1 or 0) ) -- speedbreakes on > 0.1 (0 - 1)
|
||||
|
||||
ExportScript.Tools.SendDataDAC("531", (lMechInfo.flaps.value > 0.93 and 1 or 0) ) -- flap
|
||||
ExportScript.Tools.SendDataDAC("532", ((lMechInfo.gear.value > 0.5 and lMechInfo.gear.nose.rod > 0.02) and 1 or 0) ) -- Intake FOD shields
|
||||
ExportScript.Tools.SendDataDAC("533", ((lMechInfo.gear.status == 0 and lMechInfo.flaps.value > 0.93) and 1 or 0) ) -- Flaps Warning, same light as gear warning light, but blinking light
|
||||
|
||||
ExportScript.Tools.SendDataDAC("541", (lMechInfo.parachute.value < 0.5 and 1 or 0) ) -- Parachute
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
|
||||
local lWarningLight = 0.0
|
||||
|
||||
--lWarningLight = ((lMechInfo.flaps.value > 0.93 and lTrueAirSpeed > 340) and 0.5 or 0.0) -- Speed Warning for Flaps, same light as gear warning light, but blinking light
|
||||
lWarningLight = ((lMechInfo.gear.status == 0 and lMechInfo.flaps.value > 0.93) and 1.0 or lWarningLight ) -- Speed Warning for Flaps, same light as gear warning light, but blinking light
|
||||
lWarningLight = (((lMechInfo.gear.status == 1 and lMechInfo.gear.value < 1) or (lMechInfo.gear.status == 0 and lMechInfo.gear.value > 0)) and 1.0 or lWarningLight ) -- gear warning light
|
||||
|
||||
ExportScript.Tools.SendData(500, string.format("%.1f", lWarningLight))
|
||||
ExportScript.Tools.SendData(501, (lMechInfo.gear.value > 0.85 and 1 or 0)) -- nose gear
|
||||
ExportScript.Tools.SendData(502, (lMechInfo.gear.value > 0.95 and 1 or 0)) -- left gear
|
||||
ExportScript.Tools.SendData(503, (lMechInfo.gear.value == 1 and 1 or 0)) -- right gear
|
||||
ExportScript.Tools.SendData(510, (lMechInfo.speedbrakes.value > 0.1 and 1 or 0)) -- speedbreakes on > 0.1 (0 - 1)
|
||||
ExportScript.Tools.SendData(531, (lMechInfo.flaps.value > 0.93 and 1 or 0)) -- flap
|
||||
ExportScript.Tools.SendData(532, ((lMechInfo.gear.value > 0.5 and lMechInfo.gear.nose.rod > 0.02) and 1 or 0)) -- Intake FOD shields
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.AF.FC_WeaponPanel_SU27(FunctionTyp)
|
||||
local lFunctionTyp = FunctionTyp or "Ikarus"
|
||||
|
||||
if ExportScript.AF.TmpWeaponPanelPresend == nil then
|
||||
ExportScript.AF.TmpWeaponPanelPresend = {[101] = 0, [102] = 0, [103] = 0, [104] = 0, [105] = 0, [106] = 0, [107] = 0, [108] = 0, [109] = 0, [110] = 0}
|
||||
end
|
||||
|
||||
if ExportScript.AF.TmpWeaponPanelActive == nil then
|
||||
ExportScript.AF.TmpWeaponPanelActive = {[201] = 0, [202] = 0, [203] = 0, [204] = 0, [205] = 0, [206] = 0, [207] = 0, [208] = 0, [209] = 0, [210] = 0}
|
||||
end
|
||||
|
||||
if ExportScript.AF.TmpWeaponPanel == nil then
|
||||
ExportScript.AF.TmpWeaponPanel = {[231] = 0, [232] = 0, [233] = 0, [234] = 0, [235] = 0}
|
||||
end
|
||||
|
||||
if ExportScript.AF.EventNumberFC_WeaponPanel == nil then
|
||||
ExportScript.AF.EventNumberFC_WeaponPanel = 0
|
||||
end
|
||||
|
||||
if(ExportScript.AF.EventNumberFC_WeaponPanel < ExportScript.AF.EventNumber) then
|
||||
ExportScript.AF.EventNumberFC_WeaponPanel = ExportScript.AF.EventNumber
|
||||
|
||||
-- defination
|
||||
ExportScript.AF.PayloadInfo = LoGetPayloadInfo()
|
||||
if ExportScript.AF.PayloadInfo ~= nil then
|
||||
if ExportScript.AF.CurrentStationTmp == nil then
|
||||
ExportScript.AF.CurrentStationTmp = -1
|
||||
end
|
||||
|
||||
if ExportScript.AF.PayloadInfo.CurrentStation > 0 and
|
||||
ExportScript.AF.CurrentStationTmp ~= ExportScript.AF.PayloadInfo.CurrentStation then
|
||||
ExportScript.AF.CurrentStationTmp = ExportScript.AF.PayloadInfo.CurrentStation
|
||||
|
||||
ExportScript.AF.TmpStationToPanel = {}
|
||||
ExportScript.AF.TmpStationToPanel[1] = {Panel = 1, StationID = 101, CurrentID = 201 } -- left
|
||||
ExportScript.AF.TmpStationToPanel[2] = {Panel = 10, StationID = 110, CurrentID = 210 } -- right
|
||||
ExportScript.AF.TmpStationToPanel[3] = {Panel = 2, StationID = 102, CurrentID = 202 }
|
||||
ExportScript.AF.TmpStationToPanel[4] = {Panel = 9, StationID = 109, CurrentID = 209 }
|
||||
ExportScript.AF.TmpStationToPanel[5] = {Panel = 3, StationID = 103, CurrentID = 203 }
|
||||
ExportScript.AF.TmpStationToPanel[6] = {Panel = 8, StationID = 108, CurrentID = 208 }
|
||||
ExportScript.AF.TmpStationToPanel[7] = {Panel = 4, StationID = 104, CurrentID = 204 }
|
||||
ExportScript.AF.TmpStationToPanel[8] = {Panel = 7, StationID = 107, CurrentID = 207 }
|
||||
ExportScript.AF.TmpStationToPanel[9] = {Panel = 5, StationID = 105, CurrentID = 205 }
|
||||
ExportScript.AF.TmpStationToPanel[10] = {Panel = 6, StationID = 106, CurrentID = 206 }
|
||||
|
||||
-- ExportScript.AF.TmpWeaponPanelActive reset
|
||||
for i = 201, 210, 1 do
|
||||
ExportScript.AF.TmpWeaponPanelActive[i] = 0
|
||||
end
|
||||
|
||||
if ExportScript.AF.TmpStationToPanel[ExportScript.AF.PayloadInfo.CurrentStation] ~= nil then
|
||||
ExportScript.AF.TmpWeaponPanelActive[ExportScript.AF.TmpStationToPanel[ExportScript.AF.PayloadInfo.CurrentStation].CurrentID] = 1 -- currrent value
|
||||
|
||||
table.foreach(ExportScript.AF.PayloadInfo.Stations, ExportScript.AF.WeaponStatusPanel_selectCurrentPayloadStation) -- corresponding station
|
||||
end
|
||||
end
|
||||
|
||||
local lWeaponType = 0.0 -- transversely striped
|
||||
if ExportScript.AF.PayloadInfo.CurrentStation > 0 then
|
||||
if ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level1 == 4 then
|
||||
if ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level2 == 4 then -- Weapon type Missle
|
||||
lWeaponType = 0.1 -- MSL
|
||||
elseif ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level2 == 7 then -- Weapon type NURS with Container
|
||||
if ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level3 == 33 then -- Weapon type Rocket
|
||||
lWeaponType = 0.2 -- RCT
|
||||
end
|
||||
elseif ExportScript.AF.PayloadInfo.Stations[ExportScript.AF.PayloadInfo.CurrentStation].weapon.level2 == 5 then -- Weapon type Bomb
|
||||
lWeaponType = 0.3 -- BB
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
Weapon Panel
|
||||
|
|
||||
---------------------------------------------------
|
||||
| | | | | | | | | | |
|
||||
1 2 3 4 5 C 6 7 8 9 10 -- display
|
||||
1 3 5 7 9 10 8 6 4 2 -- Paylod ID
|
||||
]]
|
||||
-- Payload Info
|
||||
-- weapon stations (panel) 1 (left) - 10 (right), no lamp for center station
|
||||
|
||||
-- WeaponPresend1 {0, 1}
|
||||
-- WeaponPresend2 {0, 1}
|
||||
-- WeaponPresend3 {0, 1}
|
||||
-- WeaponPresend4 {0, 1}
|
||||
-- WeaponPresend5 {0, 1}
|
||||
-- WeaponPresend6 {0, 1}
|
||||
-- WeaponPresend7 {0, 1}
|
||||
-- WeaponPresend8 {0, 1}
|
||||
-- WeaponPresend9 {0, 1}
|
||||
-- WeaponPresend10 {0, 1}
|
||||
-- WeaponActive1 {0, 1}
|
||||
-- WeaponActive2 {0, 1}
|
||||
-- WeaponActive3 {0, 1}
|
||||
-- WeaponActive4 {0, 1}
|
||||
-- WeaponActive5 {0, 1}
|
||||
-- WeaponActive6 {0, 1}
|
||||
-- WeaponActive7 {0, 1}
|
||||
-- WeaponActive8 {0, 1}
|
||||
-- WeaponActive9 {0, 1}
|
||||
-- WeaponActive10 {0, 1}
|
||||
|
||||
ExportScript.AF.TmpWeaponPanelPresend[101] = (ExportScript.AF.PayloadInfo.Stations[1].count > 0 and 1 or 0) -- weapon presend panel 1
|
||||
ExportScript.AF.TmpWeaponPanelPresend[102] = (ExportScript.AF.PayloadInfo.Stations[3].count > 0 and 1 or 0) -- weapon presend panel 2
|
||||
ExportScript.AF.TmpWeaponPanelPresend[103] = (ExportScript.AF.PayloadInfo.Stations[5].count > 0 and 1 or 0) -- weapon presend panel 3
|
||||
ExportScript.AF.TmpWeaponPanelPresend[104] = (ExportScript.AF.PayloadInfo.Stations[7].count > 0 and 1 or 0) -- weapon presend panel 4
|
||||
ExportScript.AF.TmpWeaponPanelPresend[105] = (ExportScript.AF.PayloadInfo.Stations[9].count > 0 and 1 or 0) -- weapon presend panel 5
|
||||
ExportScript.AF.TmpWeaponPanelPresend[106] = (ExportScript.AF.PayloadInfo.Stations[10].count > 0 and 1 or 0) -- weapon presend panel 6
|
||||
ExportScript.AF.TmpWeaponPanelPresend[107] = (ExportScript.AF.PayloadInfo.Stations[8].count > 0 and 1 or 0) -- weapon presend panel 7
|
||||
ExportScript.AF.TmpWeaponPanelPresend[108] = (ExportScript.AF.PayloadInfo.Stations[6].count > 0 and 1 or 0) -- weapon presend panel 8
|
||||
ExportScript.AF.TmpWeaponPanelPresend[109] = (ExportScript.AF.PayloadInfo.Stations[4].count > 0 and 1 or 0) -- weapon presend panel 9
|
||||
ExportScript.AF.TmpWeaponPanelPresend[110] = (ExportScript.AF.PayloadInfo.Stations[2].count > 0 and 1 or 0) -- weapon presend panel 10
|
||||
--ExportScript.AF.TmpWeaponPanelActive[201] -- weapon active panel 1
|
||||
--ExportScript.AF.TmpWeaponPanelActive[202] -- weapon active panel 2
|
||||
--ExportScript.AF.TmpWeaponPanelActive[203] -- weapon active panel 3
|
||||
--ExportScript.AF.TmpWeaponPanelActive[204] -- weapon active panel 4
|
||||
--ExportScript.AF.TmpWeaponPanelActive[205] -- weapon active panel 5
|
||||
--ExportScript.AF.TmpWeaponPanelActive[206] -- weapon active panel 6
|
||||
--ExportScript.AF.TmpWeaponPanelActive[207] -- weapon active panel 7
|
||||
--ExportScript.AF.TmpWeaponPanelActive[208] -- weapon active panel 8
|
||||
--ExportScript.AF.TmpWeaponPanelActive[209] -- weapon active panel 9
|
||||
--ExportScript.AF.TmpWeaponPanelActive[210] -- weapon active panel 10
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport and lFunctionTyp == "Ikarus" then
|
||||
for key, value in pairs(ExportScript.AF.TmpWeaponPanelPresend) do
|
||||
ExportScript.Tools.SendData(key, value)
|
||||
end
|
||||
for key, value in pairs(ExportScript.AF.TmpWeaponPanelActive) do
|
||||
ExportScript.Tools.SendData(key, value)
|
||||
end
|
||||
end
|
||||
|
||||
if ExportScript.Config.DACExport and lFunctionTyp == "DAC" then
|
||||
for key, value in pairs(ExportScript.AF.TmpWeaponPanelPresend) do
|
||||
ExportScript.Tools.SendDataDAC(key, value)
|
||||
end
|
||||
for key, value in pairs(ExportScript.AF.TmpWeaponPanelActive) do
|
||||
ExportScript.Tools.SendDataDAC(key, value)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,7 +1,7 @@
|
||||
-- Ka-50 Export
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.Ka50 = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
@@ -48,6 +48,7 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
-- Barometric Altimeter (VM_15PV)
|
||||
--------------------------------------------------
|
||||
[87] = "%.4f", -- VM_15PV_BALT_thousands {0.0,1.0}
|
||||
[573] = "%.4f", -- VM_15PV_BALT_tenths {0.0,1.0}
|
||||
[88] = "%0.2f", -- VM_15PV_BaroPressure {0.0,1.0}
|
||||
[89] = "%.4f", -- VM_15PV_BALT_CommandedAlt {0.0,1.0}
|
||||
-- HSI (PNP-72-16)
|
||||
@@ -662,7 +663,7 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
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))
|
||||
]]
|
||||
-- function for Ikarus
|
||||
@@ -1170,7 +1171,7 @@ function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
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(44, string.format("%.1f", mainPanelDevice:get_argument_value(44))) -- lamp_MasterWarning {0.0,0.3} {0,1}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- L-39C
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.L39C = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
@@ -17,8 +17,8 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
-- Radar altimeter RV-5
|
||||
[58] = "%.4f", -- RV-5 RALT {0.0, 0.086, 0.439, 0.878, 0.955}{0.0, 20.0, 100.0, 700.0, 800.0}
|
||||
[59] = "%.4f", -- RV-5 DangerRALT index {0.0, 0.094, 0.48, 0.998}{0.0, 20.0, 100.0, 700.0}
|
||||
[63] = "%.f", -- RV-5 DangerRALT lamp
|
||||
[62] = "%.4f", -- RV-5 warning flag
|
||||
[63] = "%.f", -- RV-5 DangerRALT lamp
|
||||
-- Variometer
|
||||
[74] = "%.4f", -- Variometer {-1.0, -0.875, -0.775, -0.44, 0.0, 0.44, 0.775, 0.875, 1.0}{-80.0, -50.0, -20.0, -10.0, 0.0, 10.0, 20.0, 50.0, 80.0}
|
||||
[76] = "%.4f", -- Variometer sideslip {-1.0, 1.0}
|
||||
@@ -185,8 +185,8 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
-- Radar altimeter RV-5
|
||||
[396] = "%.4f", -- Backseat - RV-5 RALT {0.0, 0.086, 0.439, 0.878, 0.955}{0.0, 20.0, 100.0, 700.0, 800.0}
|
||||
[397] = "%.4f", -- Backseat - RV-5 DangerRALT index {0.0, 0.094, 0.48, 0.998}{0.0, 20.0, 100.0, 700.0}
|
||||
[401] = "%.f", -- Backseat - RV-5 DangerRALT lamp
|
||||
[400] = "%.4f", -- Backseat - RV-5 warning flag
|
||||
[401] = "%.f", -- Backseat - RV-5 DangerRALT lamp
|
||||
-- Variometer
|
||||
[416] = "%.4f", -- Backseat - Variometer {-1.0, -0.875, -0.775, -0.44, 0.0, 0.44, 0.775, 0.875, 1.0}{-80.0, -50.0, -20.0, -10.0, 0.0, 10.0, 20.0, 50.0, 80.0}
|
||||
[418] = "%.4f", -- Backseat - Variometer sideslip {-1.0, 1.0}
|
||||
@@ -202,8 +202,8 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
[369] = "%.4f", -- Backseat - KPP SDU Roll {-1.0, 1.0}
|
||||
[370] = "%.4f", -- Backseat - KPP SDU Pitch {-1.0, 1.0}
|
||||
-- NPP HSI
|
||||
[378] = "%.4f", -- Backseat - HSI2 heading {1.0, 0.0}{0.0, math.pi * 2.0}
|
||||
[379] = "%.4f", -- Backseat - HSI2 commanded course needle {1.0, 0.0}{0.0, math.pi * 2.0}
|
||||
--[378] = "%.4f", -- Backseat - HSI2 heading {1.0, 0.0}{0.0, math.pi * 2.0}
|
||||
--[379] = "%.4f", -- Backseat - HSI2 commanded course needle {1.0, 0.0}{0.0, math.pi * 2.0}
|
||||
[380] = "%.4f", -- Backseat - HSI2 bearing needle {1.0, 0.0}{0.0, math.pi * 2.0}
|
||||
[384] = "%.4f", -- Backseat - HSI2 Course Deviation Bar {-0.8, 0.8}{-1.0, 1.0}
|
||||
[382] = "%.4f", -- Backseat - HSI2 Alt Deviation Bar {-0.8, 0.8}{-1.0, 1.0}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- L-39C
|
||||
-- Version 1.0.2
|
||||
-- L-39ZA
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.L39ZA = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
@@ -17,8 +17,8 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
-- Radar altimeter RV-5
|
||||
[58] = "%.4f", -- RV-5 RALT {0.0, 0.086, 0.439, 0.878, 0.955}{0.0, 20.0, 100.0, 700.0, 800.0}
|
||||
[59] = "%.4f", -- RV-5 DangerRALT index {0.0, 0.094, 0.48, 0.998}{0.0, 20.0, 100.0, 700.0}
|
||||
[63] = "%.f", -- RV-5 DangerRALT lamp
|
||||
[62] = "%.4f", -- RV-5 warning flag
|
||||
[63] = "%.f", -- RV-5 DangerRALT lamp
|
||||
-- Variometer
|
||||
[74] = "%.4f", -- Variometer {-1.0, -0.875, -0.775, -0.44, 0.0, 0.44, 0.775, 0.875, 1.0}{-80.0, -50.0, -20.0, -10.0, 0.0, 10.0, 20.0, 50.0, 80.0}
|
||||
[76] = "%.4f", -- Variometer sideslip {-1.0, 1.0}
|
||||
@@ -186,8 +186,8 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
-- Radar altimeter RV-5
|
||||
[396] = "%.4f", -- Backseat - RV-5 RALT {0.0, 0.086, 0.439, 0.878, 0.955}{0.0, 20.0, 100.0, 700.0, 800.0}
|
||||
[397] = "%.4f", -- Backseat - RV-5 DangerRALT index {0.0, 0.094, 0.48, 0.998}{0.0, 20.0, 100.0, 700.0}
|
||||
[401] = "%.f", -- Backseat - RV-5 DangerRALT lamp
|
||||
[400] = "%.4f", -- Backseat - RV-5 warning flag
|
||||
[401] = "%.f", -- Backseat - RV-5 DangerRALT lamp
|
||||
-- Variometer
|
||||
[416] = "%.4f", -- Backseat - Variometer {-1.0, -0.875, -0.775, -0.44, 0.0, 0.44, 0.775, 0.875, 1.0}{-80.0, -50.0, -20.0, -10.0, 0.0, 10.0, 20.0, 50.0, 80.0}
|
||||
[418] = "%.4f", -- Backseat - Variometer sideslip {-1.0, 1.0}
|
||||
@@ -203,8 +203,8 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
[369] = "%.4f", -- Backseat - KPP SDU Roll {-1.0, 1.0}
|
||||
[370] = "%.4f", -- Backseat - KPP SDU Pitch {-1.0, 1.0}
|
||||
-- NPP HSI
|
||||
[378] = "%.4f", -- Backseat - HSI2 heading {1.0, 0.0}{0.0, math.pi * 2.0}
|
||||
[379] = "%.4f", -- Backseat - HSI2 commanded course needle {1.0, 0.0}{0.0, math.pi * 2.0}
|
||||
--[378] = "%.4f", -- Backseat - HSI2 heading {1.0, 0.0}{0.0, math.pi * 2.0}
|
||||
--[379] = "%.4f", -- Backseat - HSI2 commanded course needle {1.0, 0.0}{0.0, math.pi * 2.0}
|
||||
[380] = "%.4f", -- Backseat - HSI2 bearing needle {1.0, 0.0}{0.0, math.pi * 2.0}
|
||||
[384] = "%.4f", -- Backseat - HSI2 Course Deviation Bar {-0.8, 0.8}{-1.0, 1.0}
|
||||
[382] = "%.4f", -- Backseat - HSI2 Alt Deviation Bar {-0.8, 0.8}{-1.0, 1.0}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
-- Mi-8MTV2 Export
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.Mi8MT = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
@@ -75,7 +75,7 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
[833] = "%.4f", -- VD_10K_L_100_Ind {0.0, 1.0}
|
||||
[832] = "%.4f", -- VD_10K_L_10_Ind {0.0, 1.0}
|
||||
[916] = "%.4f", -- VD_10K_L_Shutter {0.822, 0.75}
|
||||
[21] = "%.4f", -- VD_10K_L_PRESS {0.0, 1.0}
|
||||
--[21] = "%.4f", -- VD_10K_L_PRESS {0.0, 1.0}
|
||||
-----
|
||||
[98] = "%.4f", -- VD_10K_R_100 {0.0, 1.0}
|
||||
[99] = "%.4f", -- VD_10K_R_10 {0.0, 1.0}
|
||||
@@ -1005,6 +1005,9 @@ function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
ExportScript.Tools.SendData(12, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(12)))) -- negate
|
||||
|
||||
ExportScript.Tools.SendData(91, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(91)))) -- negate
|
||||
|
||||
--[21] = "%.4f", -- VD_10K_L_PRESS {0.0, 1.0}
|
||||
ExportScript.Tools.SendData(21, string.format("%.4f", ExportScript.Tools.negate(mainPanelDevice:get_argument_value(21)))) -- negate
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- MiG-15Bis
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.MiG15bis = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
@@ -79,11 +79,11 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
[43] = "%.4f", -- EngineFuelPressure {0.0,100.0} {0.0,1.0}
|
||||
[46] = "%.4f", -- FuelPressure {0.0,10.0} {0.0,1.0}
|
||||
-- radio compass
|
||||
[238] = "%.4f", -- ARC5_Band {0.0, 2.0} {0.0, 0.4}
|
||||
[176] = "%.4f", -- ARC5_TuningMeter
|
||||
[175] = "%.4f", -- ARC5_Tuning {0.0, 0.2} {0.0, 1.0}
|
||||
[38] = "%.4f", -- ARC5_Bearing
|
||||
[239] = "%.4f", -- ARC5_FreqScale {0.0,0.5,1.0,1.5,2.0,2.5,3.0} {0.0,0.0695,0.14,0.2865,0.43,0.7155,1.0}
|
||||
[238] = "%.4f", -- ARK5_Band {0.0, 2.0} {0.0, 0.4}
|
||||
[176] = "%.4f", -- ARK5_TuningMeter
|
||||
[175] = "%.4f", -- ARK5_Tuning {0.0, 0.2} {0.0, 1.0}
|
||||
[38] = "%.4f", -- ARK5_Bearing
|
||||
[239] = "%.4f", -- ARK5_FreqScale {0.0,0.5,1.0,1.5,2.0,2.5,3.0} {0.0,0.0695,0.14,0.2865,0.43,0.7155,1.0}
|
||||
-- Radio RSI-6K
|
||||
[235] = "%.4f", -- RadioAntennaPower
|
||||
[128] = "%.4f", -- RadioReceiverKnob {0.0, 0.2}{0.0, 1.0}
|
||||
@@ -115,9 +115,9 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
[124] = "%.f", -- lamp_AirBrakeExt {-1.0, 1.0}{-1.0, 1.0}
|
||||
-- fire extinguisher system
|
||||
[135] = "%.f", -- lamp_FireDetected {-1.0, 1.0}{-1.0, 1.0}
|
||||
-- ARC-5
|
||||
[183] = "%.f", -- lamp_ARC_5 {-1.0, 1.0}{-1.0, 1.0}
|
||||
[218] = "%.f", -- light_ARC_5_scale {-1.0, 1.0}{-1.0, 1.0}
|
||||
-- ARK-5
|
||||
[183] = "%.f", -- lamp_ARK_5 {-1.0, 1.0}{-1.0, 1.0}
|
||||
[218] = "%.f", -- light_ARK_5_scale {-1.0, 1.0}{-1.0, 1.0}
|
||||
-- MRP-48P
|
||||
[54] = "%.f", -- lamp_Marker {-1.0, 1.0}{-1.0, 1.0}
|
||||
-- Light System
|
||||
@@ -169,7 +169,7 @@ ExportScript.ConfigArguments =
|
||||
[158] = "%.4f", -- Radio Switch, ON/OFF
|
||||
[157] = "%.4f", -- Bombs Switch, ON/OFF
|
||||
[156] = "%.4f", -- Emergency Drop Switch, ON/OFF
|
||||
[159] = "%.4f", -- ARC Switch, ON/OFF
|
||||
[159] = "%.4f", -- ARK Switch, ON/OFF
|
||||
[160] = "%.4f", -- RV-2 Radio Altimeter Switch, ON/OFF
|
||||
[161] = "%.4f", -- NR-23 Cannon Switch, ON/OFF
|
||||
[162] = "%.4f", -- N-37D Cannon Switch, ON/OFF
|
||||
@@ -249,19 +249,19 @@ ExportScript.ConfigArguments =
|
||||
[102] = "%.4f", -- ASP-3N Gunsight Brightness Knob (rotary)
|
||||
[201] = "%.4f", -- ASP-3N Gunsight Target Distance (rotary)
|
||||
[105] = "%.4f", -- ASP-3N Gunsight Color Filter, ON/OFF
|
||||
-- ARC-5 radio compass
|
||||
[180] = "%.4f", -- ARC-5 Audio Volume Control (rotary)
|
||||
[177] = "%.4f", -- ARC-5 Frequency Band Switch
|
||||
[174] = "%.4f", -- ARC-5 Function Selector Switch, OFF/COMP/ANT./LOOP
|
||||
[178] = "%.4f", -- ARC-5 LOOP L-R Switch
|
||||
--[] = "%.4f", -- ARC-5 Tuning Crank (rotary)
|
||||
[181] = "%.4f", -- ARC-5 Scale Light Control (rotary)
|
||||
[173] = "%.4f", -- ARC-5 TLG-TLF Switch
|
||||
[182] = "%.4f", -- ARC-5 Take Control Button
|
||||
[123] = "%.4f", -- ARC-5 Near/Far NDB Switch
|
||||
[146] = "%.4f", -- ARC-5 NDB 1 Switch
|
||||
[147] = "%.4f", -- ARC-5 NDB 2 Switch
|
||||
[148] = "%.4f", -- ARC-5 NDB 3 Switch
|
||||
-- ARK-5 radio compass
|
||||
[180] = "%.4f", -- ARK-5 Audio Volume Control (rotary)
|
||||
[177] = "%.4f", -- ARK-5 Frequency Band Switch
|
||||
[174] = "%.4f", -- ARK-5 Function Selector Switch, OFF/COMP/ANT./LOOP
|
||||
[178] = "%.4f", -- ARK-5 LOOP L-R Switch
|
||||
--[] = "%.4f", -- ARK-5 Tuning Crank (rotary)
|
||||
[181] = "%.4f", -- ARK-5 Scale Light Control (rotary)
|
||||
[173] = "%.4f", -- ARK-5 TLG-TLF Switch
|
||||
[182] = "%.4f", -- ARK-5 Take Control Button
|
||||
[123] = "%.4f", -- ARK-5 Near/Far NDB Switch
|
||||
[146] = "%.4f", -- ARK-5 NDB 1 Switch
|
||||
[147] = "%.4f", -- ARK-5 NDB 2 Switch
|
||||
[148] = "%.4f", -- ARK-5 NDB 3 Switch
|
||||
-- RSI-6K radio
|
||||
[126] = "%.4f", -- RSI-6K Audio Volume Control (rotary)
|
||||
[232] = "%.4f", -- RSI-6K Wave Control (rotary)
|
||||
@@ -269,7 +269,7 @@ ExportScript.ConfigArguments =
|
||||
[231] = "%.4f", -- RSI-6K Wave Lock
|
||||
[233] = "%.4f", -- RSI-6K Antenna Lock
|
||||
[128] = "%.4f", -- RSI-6K Receiver Tuning (rotary)
|
||||
[140] = "%.4f", -- RSI-6K Receive/ARC
|
||||
[140] = "%.4f", -- RSI-6K Receive/ARK
|
||||
[240] = "%.4f", -- RSI-6K Forced Mode, ON/OFF
|
||||
[202] = "%.4f", -- Microphone Button
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- MiG-21Bis Export
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.MiG21Bis = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
@@ -304,7 +304,7 @@ ExportScript.ConfigArguments =
|
||||
[159] = "%.1f", -- Fuel Tanks 3rd Group, Fuel Pump
|
||||
[160] = "%.1f", -- Fuel Tanks 1st Group, Fuel Pump
|
||||
[161] = "%.1f", -- Drain Fuel Tank, Fuel Pump
|
||||
[274] = "%.1f", -- Fuel Quantity Set
|
||||
[274] = "%.2f", -- Fuel Quantity Set
|
||||
-- ENGINE START DEVICE
|
||||
[302] = "%.1f", -- APU On/Off
|
||||
[288] = "%.1f", -- Engine Cold / Normal Start
|
||||
@@ -318,7 +318,7 @@ ExportScript.ConfigArguments =
|
||||
[279] = "%.1f", -- Pitot tube/Periscope/Clock Heat
|
||||
[280] = "%.1f", -- Secondary Pitot Tube Heat
|
||||
-- DA-200
|
||||
[261] = "%.1f", -- Variometer Set
|
||||
[261] = "%.4f", -- Variometer Set
|
||||
-- ENGINE
|
||||
[308] = "%.1f", -- Anti surge doors - Auto/Manual
|
||||
[300] = "%.1f", -- Afterburner/Maximum Off/On
|
||||
@@ -333,27 +333,36 @@ ExportScript.ConfigArguments =
|
||||
[157] = "%.1f", -- Main Red Lights default_axis
|
||||
[222] = "%.1f", -- Main White Lights default_axis
|
||||
[194] = "%.1f", -- Navigation Lights Off/Min/Med/Max
|
||||
[323] = "%.1f", -- Landing Lights Off/Taxi/Land
|
||||
-- LIGHTS WARNING
|
||||
[195] = "%.1f", -- CheckWarningLights11
|
||||
[196] = "%.1f", -- CheckWarningLights21
|
||||
[273] = "%.1f", -- CheckWarningLights31
|
||||
[282] = "%.1f", -- CheckWarningLights41
|
||||
[283] = "%.1f", -- CheckWarningLights51
|
||||
[322] = "%.1f", -- CheckWarningLights61
|
||||
[323] = "%.2f", -- Landing Lights Off/Taxi/Land
|
||||
-- LIGHTS WARNING AXIS
|
||||
[195] = "%.1f", -- Set Warning Light Day/Night T4
|
||||
[196] = "%.1f", -- Set Warning Light Day/Night T10
|
||||
[273] = "%.1f", -- Set Warning Light Day/Night T4-2
|
||||
[282] = "%.1f", -- Set Warning Light Day/Night T4-3
|
||||
[283] = "%.1f", -- Set Warning Light Day/Night T10-2
|
||||
[322] = "%.1f", -- Set Warning Light Day/Night PPS
|
||||
[657] = "%.1f", -- SORC
|
||||
-- LIGHTS WARNING BUTTONS
|
||||
[369] = "%.1f", -- Check Warning Lights T4
|
||||
[370] = "%.1f", -- Check Warning Lights T10
|
||||
[371] = "%.1f", -- Check Warning Lights T4-2
|
||||
[372] = "%.1f", -- Check Warning Lights T4-3
|
||||
[373] = "%.1f", -- Check Warning Lights T10-2
|
||||
[374] = "%.1f", -- Check Warning Lights PPS
|
||||
[255] = "%.1f", -- SORC
|
||||
-- Radio
|
||||
[173] = "%.1f", -- Radio System On/Off
|
||||
[208] = "%.1f", -- Radio / Compass
|
||||
[209] = "%.1f", -- Squelch On/Off
|
||||
[210] = "%.1f", -- Radio Volume
|
||||
[211] = "%.1f", -- Radio Channel
|
||||
[211] = "%.2f", -- Radio Channel
|
||||
[315] = "%.1f", -- Radio PTT
|
||||
-- ARK
|
||||
[174] = "%.1f", -- ARK On/Off
|
||||
[198] = "%.1f", -- ARK Sound
|
||||
[212] = "%.1f", -- ARK Change
|
||||
[189] = "%.1f", -- ARK Zone
|
||||
[213] = "%.1f", -- ARK 1 - 9 {0.1,0.2,...,0.8,0.9}
|
||||
[189] = "%.2f", -- ARK Zone
|
||||
[197] = "%.1f", -- ARK Mode - Antenna / Compass
|
||||
[254] = "%.1f", -- Marker Far/Near
|
||||
-- RSBN
|
||||
@@ -364,8 +373,8 @@ ExportScript.ConfigArguments =
|
||||
[347] = "%.1f", -- RSBN self-test
|
||||
--RSBN Panel
|
||||
[345] = "%.1f", -- RSBN Sound
|
||||
[351] = "%.1f", -- RSBN Navigation
|
||||
[352] = "%.1f", -- PRMG Landing
|
||||
[351] = "%.2f", -- RSBN Navigation
|
||||
[352] = "%.2f", -- PRMG Landing
|
||||
[366] = "%.1f", -- RSBN Reset
|
||||
[367] = "%.1f", -- RSBN Bearing
|
||||
[368] = "%.1f", -- RSBN Distance
|
||||
@@ -396,7 +405,7 @@ ExportScript.ConfigArguments =
|
||||
[200] = "%.1f", -- SOD IFF On/Off
|
||||
[199] = "%.1f", -- SOD Identify
|
||||
[201] = "%.1f", -- SOD Wave Selector 3/1/2
|
||||
[204] = "%.1f", -- SOD Modes
|
||||
[204] = "%.2f", -- SOD Modes
|
||||
-- RADAR
|
||||
[205] = "%.1f", -- Radar Off/Prep/On
|
||||
[206] = "%.1f", -- Low Altitude Off/Comp/On
|
||||
@@ -433,7 +442,7 @@ ExportScript.ConfigArguments =
|
||||
[237] = "%.1f", -- Emergency Brake
|
||||
-- Gears
|
||||
[326] = "%.1f", -- Gear Handle Fixator
|
||||
[327] = "%.1f", -- Gear Up/Neutral/Down
|
||||
[327] = "%.1f", -- Gear Up/Neutral/Down {-1.0,0.0,1.0}
|
||||
[223] = "%.1f", -- Main Gears Emergency Release Handle
|
||||
[281] = "%.1f", -- Nose Gear Emergency Release Handle
|
||||
-- Flaps
|
||||
@@ -451,7 +460,7 @@ ExportScript.ConfigArguments =
|
||||
-- KONUS
|
||||
[170] = "%.1f", -- Nosecone On/Off
|
||||
[309] = "%.1f", -- Nosecone Control - Manual/Auto
|
||||
[236] = "%.1f", -- Nosecone manual position controller
|
||||
[236] = "%.2f", -- Nosecone manual position controller
|
||||
-- SOPLO
|
||||
[291] = "%.1f", -- Engine Nozzle 2 Position Emergency Control
|
||||
--MAIN_HYDRO and BUSTER_HYDRO == == == == == == == == == == == == == == == == == == == TEMPORARY MERGED == == == == == == == == == == == == == == == == == == == == == ==
|
||||
@@ -460,7 +469,7 @@ ExportScript.ConfigArguments =
|
||||
--KPP
|
||||
[177] = "%.1f", -- KPP Main/Emergency
|
||||
[259] = "%.1f", -- KPP Cage
|
||||
[260] = "%.1f", -- KPP Set
|
||||
[260] = "%.4f", -- KPP Set
|
||||
--IAS / TAS / KSI (NPP)
|
||||
[178] = "%.1f", -- NPP On/Off
|
||||
[258] = "%.1f", -- NPP Adjust
|
||||
@@ -531,6 +540,9 @@ ExportScript.ConfigArguments =
|
||||
[292] = "%.1f", -- Cockpit Air Condition Off/Cold/Auto/Warm
|
||||
-- SARPP
|
||||
[193] = "%.1f", -- SARPP-12 Flight Data Recorder On/Off
|
||||
--avAChS Clock
|
||||
[265] = "%.1f", -- Mech clock left lever
|
||||
[264] = "%.1f", -- Mech clock left lever
|
||||
-- Flight Control
|
||||
|
||||
-- Dummy buttons/switches
|
||||
@@ -540,8 +552,8 @@ ExportScript.ConfigArguments =
|
||||
[635] = "%.1f", -- Electric Bus Nr.1 - Cover
|
||||
[636] = "%.1f", -- Electric Bus Nr.1
|
||||
[637] = "%.1f", -- Electric Bus Nr.2
|
||||
[638] = "%.1f", -- 1.7 Mach Test Button - Cover
|
||||
[639] = "%.1f", -- 1.7 Mach Test Button
|
||||
[638] = "%.1f", -- 1.5 Mach Test Button - Cover
|
||||
[639] = "%.1f", -- 1.5 Mach Test Button
|
||||
[640] = "%.1f", -- BU-45 Buster System Separation
|
||||
[642] = "%.1f", -- SOD Control PBU-1
|
||||
[641] = "%.1f", -- SOD Control PBU-2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- MiG-29A Export
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.MiG29A = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
@@ -95,16 +95,19 @@ function ExportScript.ProcessIkarusFCHighImportanceConfig()
|
||||
ExportScript.AF.FC_Russian_EngineRPM()
|
||||
|
||||
-- Left Jet Engine Turbine Temperature Indicator (EngineTemp, ExportID)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempLeft + 80, 70)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempLeft, 70)
|
||||
|
||||
-- Right Jet Engine Turbine Temperature Indicator (EngineTemp, ExportID)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempRight + 80, 71)
|
||||
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempRight, 71)
|
||||
|
||||
-- Clock from Ka-50
|
||||
ExportScript.AF.FC_Russian_Clock_late()
|
||||
|
||||
-- Machmeter
|
||||
ExportScript.AF.FC_Russian_Mach_MiG29()
|
||||
|
||||
-- Magnetic Compass
|
||||
ExportScript.AF.FC_Russian_Compass2()
|
||||
else
|
||||
ExportScript.Tools.WriteToLog("Unknown FC Error, no LoGetSelfData.")
|
||||
end
|
||||
@@ -145,21 +148,38 @@ function ExportScript.ProcessIkarusFCLowImportanceConfig()
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 86)
|
||||
|
||||
-- Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.left, 240, 87)
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 89)
|
||||
end
|
||||
|
||||
-- Engine Lamps, Start and Afterburner
|
||||
ExportScript.AF.FC_EngineLamps_MiG29(lFunctionTyp)
|
||||
|
||||
-- Oxygen Pressure Left
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 89)
|
||||
|
||||
-- Oxygen Pressure Center
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 90)
|
||||
|
||||
-- Oxygen Pressure Right
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 91)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
if lMechInfo ~= nil then
|
||||
-- Wheelbrakes Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 87)
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 16, 92)
|
||||
|
||||
-- Wheelbrakes Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 88)
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 16, 93)
|
||||
end
|
||||
|
||||
ExportScript.AF.FC_Russian_FlareChaff_MiG29(lFunctionTyp)
|
||||
|
||||
--[[
|
||||
--[[
|
||||
local lPayloadInfo = LoGetPayloadInfo()
|
||||
ExportScript.Tools.WriteToLog('lPayloadInfo: '..ExportScript.Tools.dump(lPayloadInfo))
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- MiG-29G Export
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.MiG29G = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
@@ -95,16 +95,19 @@ function ExportScript.ProcessIkarusFCHighImportanceConfig()
|
||||
ExportScript.AF.FC_Russian_EngineRPM()
|
||||
|
||||
-- Left Jet Engine Turbine Temperature Indicator (EngineTemp, ExportID)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempLeft + 80, 70)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempLeft, 70)
|
||||
|
||||
-- Right Jet Engine Turbine Temperature Indicator (EngineTemp, ExportID)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempRight + 80, 71)
|
||||
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempRight, 71)
|
||||
|
||||
-- Clock from Ka-50
|
||||
ExportScript.AF.FC_Russian_Clock_late()
|
||||
|
||||
-- Machmeter
|
||||
ExportScript.AF.FC_Russian_Mach_MiG29()
|
||||
|
||||
-- Magnetic Compass
|
||||
ExportScript.AF.FC_Russian_Compass2()
|
||||
else
|
||||
ExportScript.Tools.WriteToLog("Unknown FC Error, no LoGetSelfData.")
|
||||
end
|
||||
@@ -145,21 +148,38 @@ function ExportScript.ProcessIkarusFCLowImportanceConfig()
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 86)
|
||||
|
||||
-- Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.left, 240, 87)
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 89)
|
||||
end
|
||||
|
||||
-- Engine Lamps, Start and Afterburner
|
||||
ExportScript.AF.FC_EngineLamps_MiG29(lFunctionTyp)
|
||||
|
||||
-- Oxygen Pressure Left
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 89)
|
||||
|
||||
-- Oxygen Pressure Center
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 90)
|
||||
|
||||
-- Oxygen Pressure Right
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 91)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
if lMechInfo ~= nil then
|
||||
-- Wheelbrakes Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 87)
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 16, 92)
|
||||
|
||||
-- Wheelbrakes Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 88)
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 16, 93)
|
||||
end
|
||||
|
||||
ExportScript.AF.FC_Russian_FlareChaff_MiG29(lFunctionTyp)
|
||||
|
||||
--[[
|
||||
--[[
|
||||
local lPayloadInfo = LoGetPayloadInfo()
|
||||
ExportScript.Tools.WriteToLog('lPayloadInfo: '..ExportScript.Tools.dump(lPayloadInfo))
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- MiG-29S Export
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.MiG29S = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
@@ -95,16 +95,19 @@ function ExportScript.ProcessIkarusFCHighImportanceConfig()
|
||||
ExportScript.AF.FC_Russian_EngineRPM()
|
||||
|
||||
-- Left Jet Engine Turbine Temperature Indicator (EngineTemp, ExportID)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempLeft + 80, 70)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempLeft, 70)
|
||||
|
||||
-- Right Jet Engine Turbine Temperature Indicator (EngineTemp, ExportID)
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempRight + 80, 71)
|
||||
|
||||
ExportScript.AF.FC_Russian_EGT_1000gc(lEngineTempRight, 71)
|
||||
|
||||
-- Clock from Ka-50
|
||||
ExportScript.AF.FC_Russian_Clock_late()
|
||||
|
||||
-- Machmeter
|
||||
ExportScript.AF.FC_Russian_Mach_MiG29()
|
||||
|
||||
-- Magnetic Compass
|
||||
ExportScript.AF.FC_Russian_Compass2()
|
||||
else
|
||||
ExportScript.Tools.WriteToLog("Unknown FC Error, no LoGetSelfData.")
|
||||
end
|
||||
@@ -145,21 +148,38 @@ function ExportScript.ProcessIkarusFCLowImportanceConfig()
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 86)
|
||||
|
||||
-- Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.left, 240, 87)
|
||||
|
||||
-- Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lEngineInfo.HydraulicPressure.right, 240, 89)
|
||||
end
|
||||
|
||||
-- Engine Lamps, Start and Afterburner
|
||||
ExportScript.AF.FC_EngineLamps_MiG29(lFunctionTyp)
|
||||
|
||||
-- Oxygen Pressure Left
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 89)
|
||||
|
||||
-- Oxygen Pressure Center
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 90)
|
||||
|
||||
-- Oxygen Pressure Right
|
||||
--ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 91)
|
||||
|
||||
local lMechInfo = LoGetMechInfo() -- mechanical components, e.g. Flaps, Wheelbrakes,...
|
||||
if lMechInfo ~= nil then
|
||||
-- Wheelbrakes Hydraulic Pressure Left
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 87)
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 16, 92)
|
||||
|
||||
-- Wheelbrakes Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 88)
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 16, 93)
|
||||
end
|
||||
|
||||
ExportScript.AF.FC_Russian_FlareChaff_MiG29(lFunctionTyp)
|
||||
|
||||
--[[
|
||||
--[[
|
||||
local lPayloadInfo = LoGetPayloadInfo()
|
||||
ExportScript.Tools.WriteToLog('lPayloadInfo: '..ExportScript.Tools.dump(lPayloadInfo))
|
||||
|
||||
|
||||
@@ -0,0 +1,331 @@
|
||||
-- P-51D-30-NA Export
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.P51D30NA = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- Flight Instruments
|
||||
[11] = "%.4f", -- AirspeedNeedle {0,50,100,150,200,250,300,350,400,450,500,550,600,650,700} {0.0,0.05,0.10,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7}
|
||||
[29] = "%.4f", -- Variometer {-6000,-4000,-2000,2000,4000,6000} {-0.6,-0.4,-0.2,0.2,0.4,0.6}
|
||||
-- Altimeter
|
||||
[97] = "%.4f", -- Altimeter_Pressure {28.1, 31.0}{0.0, 1.0}
|
||||
[96] = "%.4f", -- Altimeter_10000_footPtr {0.0, 100000.0}{0.0, 1.0}
|
||||
[24] = "%.4f", -- Altimeter_1000_footPtr {0.0, 10000.0}{0.0, 1.0}
|
||||
[25] = "%.4f", -- Altimeter_100_footPtr{0.0, 1000.0}{0.0, 1.0}
|
||||
-- Artificial horizon
|
||||
[15] = "%.4f", -- AHorizon_Pitch {1.0, -1.0}
|
||||
[14] = "%.4f", -- AHorizon_Bank {1.0, -1.0}
|
||||
[16] = "%.1f", -- AHorizon_PitchShift {-1.0, 1.0}
|
||||
[20] = "%.1f", -- AHorizon_Caged {0.0, 1.0}
|
||||
-- directional gyro
|
||||
[12] = "%.4f", -- GyroHeading
|
||||
-- turn indicator
|
||||
[27] = "%.4f", -- TurnNeedle {-1.0, 1.0}
|
||||
[28] = "%.4f", -- Slipball {-1.0, 1.0}
|
||||
-- oxygen pressure indicator
|
||||
[34] = "%.4f", -- Oxygen_Pressure {0.0, 500.0} {0.0, 1.0}
|
||||
[33] = "%.4f", -- Oxygen_Flow_Blinker
|
||||
-- fuel system
|
||||
[155] = "%.4f", -- Fuel_Tank_Left {0.0,5.0,15.0,30.0,45.0,60.0,75.0,92.0} {0.0,0.2,0.36,0.52,0.65,0.77,0.92,1.0}
|
||||
[156] = "%.4f", -- Fuel_Tank_Right {0.0,5.0,15.0,30.0,45.0,60.0,75.0,92.0} {0.0,0.2,0.36,0.52,0.65,0.77,0.92,1.0}
|
||||
[160] = "%.4f", -- Fuel_Tank_Fuselage {0.0,10.0,20.0,30.0,40.0,50.0,60.0,70.0,80.0,85.0} {0.0,0.12,0.28,0.40,0.51,0.62,0.72,0.83,0.96,1.0}
|
||||
[32] = "%.4f", -- Fuel_Pressure {0.0, 25.0} {0.0, 1.0}
|
||||
-- A-11 clock
|
||||
[4] = "%.4f", -- CLOCK_currtime_hours {0.0, 12.0}{0.0, 1.0}
|
||||
[5] = "%.4f", -- CLOCK_currtime_minutes {0.0, 60.0}{0.0, 1.0}
|
||||
[6] = "%.4f", -- CLOCK_currtime_seconds {0.0, 60.0}{0.0, 1.0}
|
||||
-- AN5730 remote compass
|
||||
[1] = "%.4f", -- CompassHeading
|
||||
[2] = "%.4f", -- CommandedCourse
|
||||
[3] = "%.4f", -- CommandedCourseKnob
|
||||
-- TailRadarWarning
|
||||
[161] = "%.f", -- Lamp TailRadarWarning
|
||||
-- SCR-522A Control panel
|
||||
[122] = "%.f", -- A_channel_light
|
||||
[123] = "%.f", -- B_channel_light
|
||||
[124] = "%.f", -- C_channel_light
|
||||
[125] = "%.f", -- D_channel_light
|
||||
[126] = "%.f", -- Transmit_light
|
||||
-- hydraulic pressure
|
||||
[78] = "%.4f", -- Hydraulic_Pressure {0.0, 2000.0} {0.0, 1.0}
|
||||
-- Landing gears handle
|
||||
[150] = "%.4f", -- Landing_Gear_Handle
|
||||
[151] = "%.4f", -- Landing_Gear_Handle_Indoor
|
||||
[80] = "%.f", -- LandingGearGreenLight
|
||||
[82] = "%.f", -- LandingGearRedLight
|
||||
-- gauges
|
||||
[10] = "%.4f", -- Manifold_Pressure {10.0, 75.0} {0.0, 1.0}
|
||||
[23] = "%.4f", -- Engine_RPM {0.0, 4500.0} {0.0, 1.0}
|
||||
[9] = "%.4f", -- Vacuum_Suction {0.0, 10.0} {0.0, 1.0}
|
||||
[21] = "%.4f", -- Carb_Temperature {-80, 150} {-0, 1}
|
||||
[22] = "%.4f", -- Coolant_Temperature {-80, 150} {-0, 1}
|
||||
[30] = "%.4f", -- Oil_Temperature {0.0, 100.0} {0, 1.0}
|
||||
[31] = "%.4f", -- Oil_Pressure {0.0, 200.0} {0, 1.0}
|
||||
[164] = "%.1f", -- Left_Fluor_Light
|
||||
[165] = "%.1f", -- Right_Fluor_Light
|
||||
[59] = "%.f", -- Hight_Blower_Lamp
|
||||
-- Trimmer
|
||||
[170] = "%.4f", -- Aileron_Trimmer {-1.0, 1.0}
|
||||
[172] = "%.4f", -- Rudder_Trimmer {-1.0, 1.0}
|
||||
[171] = "%.4f", -- Elevator_Trimmer {-1.0, 1.0}
|
||||
[174] = "%.4f", -- Control_Lock_Bracket
|
||||
[175] = "%.4f", -- Accelerometer_main {-5.0, 12.0} {0.0, 1.0}
|
||||
[177] = "%.4f", -- Accelerometer_min {-5.0, 12.0} {0.0, 1.0}
|
||||
[178] = "%.4f", -- Accelerometer_max {-5.0, 12.0} {0.0, 1.0}
|
||||
[101] = "%.4f", -- Ammeter {0.0, 150.0} {0.0, 1.0}
|
||||
-- light
|
||||
[185] = "%.1f", -- Left_cockpit_light
|
||||
[186] = "%.1f", -- Right_cockpit_light
|
||||
[190] = "%.4f", -- warEmergencyPowerLimWire
|
||||
-------------
|
||||
--[181] = "%.4f", -- Panel_Shake_Z
|
||||
--[180] = "%.4f", -- Panel_Shake_Y
|
||||
--[189] = "%.4f", -- Panel_Rot_X
|
||||
--[162] = "%.1f", -- Canopy_Trucks
|
||||
--[163] = "%.1f", -- Canopy_Visibility
|
||||
-- Stick
|
||||
--[50] = "%.4f", -- StickPitch
|
||||
--[51] = "%.4f", -- StickBank
|
||||
-- RudderPedals
|
||||
--[54] = "%.4f", -- RudderPedals
|
||||
--[55] = "%.4f", -- Left_Wheel_Brake
|
||||
--[56] = "%.4f", -- Right_Wheel_Brake
|
||||
-- K-14 gunsight
|
||||
[36] = "%.4f", -- sightRange
|
||||
--[188] = "%.4f", -- K_14_Shake_Z
|
||||
--[187] = "%.4f", -- K_14_Shake_Y
|
||||
-------------
|
||||
--[45] = "%.4f", -- ThrottleTwistGrip
|
||||
-------------
|
||||
[77] = "%.4f", -- Rocket_Counter
|
||||
-------------
|
||||
--[413] = "%.1f", -- WindShieldDamages
|
||||
--[412] = "%.1f", -- WindShieldOil
|
||||
}
|
||||
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
-- Right Swich Panel
|
||||
[102] = "%d", -- Generator Connect/Disconnect
|
||||
[103] = "%d", -- Battery Connect/Disconnect
|
||||
[104] = "%d", -- Gun Heating ON/OFF
|
||||
[105] = "%d", -- Pitot Heating ON/OFF
|
||||
[106] = "%d", -- Wing Position Lights Bright/Off/Dim
|
||||
[107] = "%d", -- Tail Position Lights Bright/Off/Dim
|
||||
[108] = "%d", -- Red Recognition Light Key/Off/Steady
|
||||
[109] = "%d", -- Green Recognition Light Key/Off/Steady
|
||||
[110] = "%d", -- Amber Recognition Light Key/Off/Steady
|
||||
[111] = "%d", -- Recognition Lights Key
|
||||
[112] = "%d", -- Circuit Protectors Reset
|
||||
[100] = "%.4f", -- Right Fluorescent Light (rotary)
|
||||
[90] = "%.4f", -- Left Fluorescent Light (rotary)
|
||||
-- Flight Instrument panel
|
||||
[3] = "%.4f", -- Course Set (rotary)
|
||||
[13] = "%.4f", -- Heading Set/Cage (rotary)
|
||||
[179] = "%d", -- Heading Set/Cage Button
|
||||
[17] = "%.4f", -- Pitch Adjustment (rotary)
|
||||
[18] = "%.4f", -- Cage (rotary)
|
||||
[19] = "%d", -- Cage Button
|
||||
[8] = "%d", -- Winding/Adjustment Clock Button
|
||||
[7] = "%.4f", -- Winding/Adjustment Clock (rotary)
|
||||
[26] = "%.4f", -- Set Pressure (rotary)
|
||||
-- SCR-522A Control panel
|
||||
[117] = "%d", -- Radio ON/OFF
|
||||
[118] = "%d", -- A Channel Activate
|
||||
[119] = "%d", -- B Channel Activate
|
||||
[120] = "%d", -- C Channel Activate
|
||||
[121] = "%d", -- D Channel Activate
|
||||
[127] = "%.4f", -- Radio Lights Dimmer (rotary)
|
||||
[116] = "%.4f", -- Radio Audio Volume (rotary)
|
||||
[44] = "%d", -- Microphone On
|
||||
[200] = "%d", -- Arm rest
|
||||
[129] = "%d", -- Switch Locking Lever
|
||||
[128] = "%d", -- Radio Mode Transmit/Receive/Remote
|
||||
-------------
|
||||
[71] = "%.4f", -- Cockpit Lights (rotary)
|
||||
[66] = "%0.1f", -- Ignition Off/Right/Left/Both
|
||||
[67] = "%d", -- Gun control Gun And Camera On/Gun And Camera OFF/Camera On
|
||||
[72] = "%d", -- Silence Landing Gear Warning Horn Cut Off
|
||||
-- Bomb Arm/Chemical
|
||||
[69] = "%d", -- Left Bomb Arm/Chemical
|
||||
[70] = "%d", -- Right Bomb Arm/Chemical
|
||||
-- Release Mode
|
||||
[68] = "%0.1f", -- Release Mode, Bombs and Rockets Safe/Bombs Train Release/Bombs Both Release/Rockets Arm
|
||||
[73] = "%0.1f", -- Rockets Release Mode Off/Single/Auto
|
||||
[74] = "%d", -- Rockets Delay Switch Delay/Int
|
||||
[75] = "%0.4f", -- Rockets Counter Control
|
||||
-- Engine Control Panel
|
||||
[58] = "%d", -- Supercharger Switch Cover
|
||||
[57] = "%0.1f", -- Supercharger AUTO/LOW/HIGH
|
||||
[60] = "%d", -- High Blower Lamp Test
|
||||
[61] = "%d", -- Fuel Booster On/Off
|
||||
[62] = "%d", -- Oil Dilute Activate
|
||||
[63] = "%d", -- Starter Activate
|
||||
[64] = "%d", -- Starter Switch Cover
|
||||
[65] = "%d", -- Primer Activate
|
||||
-- Oxygen Regulator
|
||||
[131] = "%d", -- Auto-Mix On-Off
|
||||
[130] = "%0.4f", -- Oxygen Emergency By-pass
|
||||
-- Fuel system
|
||||
[85] = "%0.1f", -- Fuel Selector Valve, Select Right Combat Tank/Select Left Main Tank/Select Fuselage Tank/Select Right Main Tank/Select Left Combat Tank
|
||||
[86] = "%d", -- Fuel Shut-Off Valve ON/OFF
|
||||
-- AN/APS-13
|
||||
[114] = "%d", -- ail Warning Radar Power ON/OFF
|
||||
[115] = "%d", -- Tail Warning Radar Test
|
||||
[113] = "%.4f", -- Tail Warning Radar Light Control (rotary)
|
||||
-------------
|
||||
[79] = "%d", -- Hydraulic Release Knob
|
||||
[94] = "%.4f", -- Flaps Control Handle (rotary)
|
||||
[84] = "%d", -- Parking Brake Handle
|
||||
[81] = "%d", -- Safe Landing Gear Light Test
|
||||
[83] = "%d", -- Unsafe Landing Gear Light Test
|
||||
-- Detrola receiver
|
||||
[137] = "%.4f", -- Detrola Frequency Selector (rotary)
|
||||
[138] = "%.4f", -- Detrola Volume (rotary)
|
||||
-- canopy
|
||||
[147] = "%.4f", -- Canopy Hand Crank (rotary)
|
||||
[149] = "%d", -- Canopy Emergency Release Handle
|
||||
-- AN/ARA-8
|
||||
[152] = "%0.1f", -- Homing Adapter Mode TRANSMIT/COMM./HOMING
|
||||
[153] = "%d", -- Homing Adapter Power On/Off
|
||||
[154] = "%d", -- Homing Adapter's Circuit Breaker
|
||||
-- SCR-695
|
||||
[139] = "%0.1f", -- IFF Code Selector Code 1/2/3/4/5/6
|
||||
[140] = "%d", -- IFF Power On/Off
|
||||
[141] = "%d", -- IFF TIME/OFF/ON
|
||||
[142] = "%d", -- IFF Detonator Circuit On/Off
|
||||
[143] = "%d", -- IFF Distress Signal On/Off
|
||||
[145] = "%d", -- IFF Detonator Left
|
||||
[146] = "%d", -- IFF Detonator Right
|
||||
-- Trimmers
|
||||
[91] = "%.4f", -- Aileron Trim (rotary)
|
||||
[92] = "%.4f", -- Elevator Trim (rotary)
|
||||
[93] = "%.4f", -- Rudder Trim (rotary)
|
||||
-------------
|
||||
[157] = "%.4f", -- Defroster (rotary)
|
||||
[158] = "%.4f", -- Cold Air (rotary)
|
||||
[159] = "%.4f", -- Hot Air (rotary)
|
||||
-------------
|
||||
[89] = "%d", -- Landing Light On/Off
|
||||
[168] = "%d", -- Coolant Control Cover
|
||||
[87] = "%0.1f", -- Close Coolant Control/Automatic Coolant Control/Open Coolant Control
|
||||
[169] = "%d", -- Oil Control Cover
|
||||
[88] = "%0.1f", -- Close Oil Control/Automatic Oil Control/Open Oil Control
|
||||
[134] = "%0.1f", -- Carburetor Cold Air Control (rotary)
|
||||
[135] = "%0.1f", -- Carburetor Warm Air Control (rotary)
|
||||
[47] = "%0.1f", -- Mixture Control Select IDLE CUT OFF/RUN/EMERGENCY FULL RICH
|
||||
[43] = "%.4f", -- Throttle (rotary)
|
||||
[46] = "%.4f", -- Propeller RPM (rotary)
|
||||
[173] = "%d", -- Surface Control Lock Plunger. Left Button - Lock Stick in the Forward Position', Right Button - Lock Stick in the Neutral Position
|
||||
[48] = "%.4f", -- Lock Throttle (rotary)
|
||||
[49] = "%.4f", -- Lock Propeller & Mixture (rotary)
|
||||
[176] = "%d", -- G-meter reset
|
||||
[183] = "%d", -- Mirror
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
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))
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
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))
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to hardware
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("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.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
@@ -1,7 +1,7 @@
|
||||
-- P-51D Export
|
||||
-- Version 1.0.2
|
||||
-- P-51D-25-NA Export
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.P51D25NA = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
@@ -201,17 +201,17 @@ ExportScript.ConfigArguments =
|
||||
[147] = "%.4f", -- Canopy Hand Crank (rotary)
|
||||
[149] = "%d", -- Canopy Emergency Release Handle
|
||||
-- AN/ARA-8
|
||||
[152] = "%0.1f", -- Homing Adapter Mode TRANSMIT/COMM./HOMING
|
||||
[153] = "%d", -- Homing Adapter Power On/Off
|
||||
[154] = "%d", -- Homing Adapter's Circuit Breaker
|
||||
--[152] = "%0.1f", -- Homing Adapter Mode TRANSMIT/COMM./HOMING
|
||||
--[153] = "%d", -- Homing Adapter Power On/Off
|
||||
--[154] = "%d", -- Homing Adapter's Circuit Breaker
|
||||
-- SCR-695
|
||||
[139] = "%0.1f", -- IFF Code Selector Code 1/2/3/4/5/6
|
||||
[140] = "%d", -- IFF Power On/Off
|
||||
[141] = "%d", -- IFF TIME/OFF/ON
|
||||
[142] = "%d", -- IFF Detonator Circuit On/Off
|
||||
[143] = "%d", -- IFF Distress Signal On/Off
|
||||
[145] = "%d", -- IFF Detonator Left
|
||||
[146] = "%d", -- IFF Detonator Right
|
||||
--[139] = "%0.1f", -- IFF Code Selector Code 1/2/3/4/5/6
|
||||
--[140] = "%d", -- IFF Power On/Off
|
||||
--[141] = "%d", -- IFF TIME/OFF/ON
|
||||
--[142] = "%d", -- IFF Detonator Circuit On/Off
|
||||
--[143] = "%d", -- IFF Distress Signal On/Off
|
||||
--[145] = "%d", -- IFF Detonator Left
|
||||
--[146] = "%d", -- IFF Detonator Right
|
||||
-- Trimmers
|
||||
[91] = "%.4f", -- Aileron Trim (rotary)
|
||||
[92] = "%.4f", -- Elevator Trim (rotary)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- SA342L
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.SA342L = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
@@ -47,7 +47,7 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
[165] = "%0.1f", -- ADF_nav2_dec {0,1} 000.X khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
-- ADF Gauge
|
||||
[113] = "%.4f", -- ADF_Fond Compass rose {0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360}{0.0,0.028,0.055,0.084,0.111,0.138,0.166,0.194,0.222,0.249,0.2775,0.305,0.332,0.36,0.388,0.415,0.4434,0.47,0.498,0.526,0.555,0.583,0.611,0.638,0.6665,0.694,0.722,0.75,0.776,0.805,0.833,0.861,0.8885,0.917,0.944,0.972,1.0}
|
||||
[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
--[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
[103] = "%.4f", -- ADF_Aiguille_fine Heading Needle fine {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
[107] = "%.1f", -- ADF_FlagCAP {0,1}
|
||||
[109] = "%.1f", -- ADF_FlagBut {0,1}
|
||||
@@ -57,9 +57,10 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
[112] = "%0.1f", -- ADF_compteur_Unit {0,1} 00X {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
-- CLOCK
|
||||
[41] = "%.3f", -- CLOCK_HOUR {0,1,2,3,4,5,6,7,8,9,10,11,12}{0,0.081,0.162,0.245,0.33,0.415,0.501,0.587,0.672,0.756,0.838,0.919,1}
|
||||
[42] = "%.3f", -- CLOCK_MINUTE {0,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,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[43] = "%.3f", -- CLOCK_SECOND {0,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,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[42] = "%.3f", -- CLOCK_SECOND {0,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,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[43] = "%.3f", -- CLOCK_MINUTE {0,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,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[44] = "%.3f", -- CLOCK_MINI {0,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}{0,0.032,0.065,0.098,0.131,0.164,0.198,0.231,0.264,0.297,0.331,0.364,0.397,0.43,0.464,0.497,0.523,0.551,0.576,0.605,0.63,0.659,0.684,0.714,0.758,0.796,0.838,0.879,0.92,0.958,1}
|
||||
[210] = "%.4f", -- Clock_ExtCouronne
|
||||
-- Wipers
|
||||
--[547] = "%.4f", -- EGPilote {-1,1}
|
||||
--[546] = "%.4f", -- EGCopilote {-1,1}
|
||||
@@ -77,7 +78,7 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
-- radar altimetre
|
||||
[94] = "%.4f", -- Radar_Altimeter {0,5,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850}{0,0.019,0.035,0.072,0.109,0.147,0.18,0.214,0.247,0.283,0.316,0.345,0.376,0.407,0.438,0.469,0.501,0.564,0.606,0.648,0.676,0.706,0.732,0.756,0.775,0.794,0.811,0.829,0.843,0.858,0.87}
|
||||
[93] = "%.4f", -- DangerRALT_index {0,5,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850}{0.0,0.0175,0.0338,0.0715,0.109,0.147,0.182,0.215,0.247,0.282,0.315,0.3445,0.377,0.407,0.439,0.47,0.5005,0.5628,0.6052,0.646,0.675,0.7058,0.7315,0.755,0.7747,0.793,0.8097,0.8272,0.8425,0.8575,0.8693}
|
||||
[97] = "%.f", -- RAltlamp {0,1}
|
||||
--[97] = "%.f", -- RAltlamp {0,1}
|
||||
[98] = "%.f", -- RAlt_flag_Panne OFF Flag{0,1}
|
||||
[99] = "%.1f", -- RAlt_flag_MA A (Test) Flag{0,1}
|
||||
[91] = "%.1f", -- RAlt_knob_MA Power/Test Knop{0,1}
|
||||
@@ -398,6 +399,18 @@ function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
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))
|
||||
]]
|
||||
--[97] = "%.f", -- RAltlamp {0,1}
|
||||
ExportScript.Tools.SendData(97, (mainPanelDevice:get_argument_value(97) > 0.009 and 1 or 0))
|
||||
|
||||
--[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
local ADF_Aiguille_large = mainPanelDevice:get_argument_value(102)
|
||||
if ADF_Aiguille_large ~= 0 then
|
||||
ADF_Aiguille_large = ADF_Aiguille_large + 0.5
|
||||
if ADF_Aiguille_large > 1 then
|
||||
ADF_Aiguille_large = ADF_Aiguille_large - 1.0
|
||||
end
|
||||
end
|
||||
ExportScript.Tools.SendData(102, string.format("%.4f", ADF_Aiguille_large))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
@@ -451,8 +464,10 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
-- AM Radio
|
||||
---------------------------------------------------
|
||||
local lAMRadio = GetDevice(5)
|
||||
--ExportScript.Tools.SendData(2001, string.format("%.3f", lAMRadio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendData(2001, ExportScript.Tools.RoundFreqeuncy(lAMRadio:get_frequency()/1000000))
|
||||
if lAMRadio:is_on() then
|
||||
--ExportScript.Tools.SendData(2001, string.format("%.3f", lAMRadio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendData(2001, ExportScript.Tools.RoundFreqeuncy(lAMRadio:get_frequency()/1000000))
|
||||
end
|
||||
|
||||
-- FM Radio PR4G
|
||||
---------------------------------------------------
|
||||
@@ -489,8 +504,8 @@ function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
end
|
||||
end
|
||||
else
|
||||
ExportScript.Tools.SendData(2004, " ")
|
||||
ExportScript.Tools.SendData(2005, " ")
|
||||
ExportScript.Tools.SendData(2004, "-")
|
||||
ExportScript.Tools.SendData(2005, "-")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -526,8 +541,10 @@ function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
-- AM Radio
|
||||
---------------------------------------------------
|
||||
local lAMRadio = GetDevice(5)
|
||||
--ExportScript.Tools.SendDataDAC("2001", string.format("%.3f", lAMRadio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2001", ExportScript.Tools.RoundFreqeuncy(lAMRadio:get_frequency()/1000000))
|
||||
if lAMRadio:is_on() then
|
||||
--ExportScript.Tools.SendDataDAC("2001", string.format("%.3f", lAMRadio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2001", ExportScript.Tools.RoundFreqeuncy(lAMRadio:get_frequency()/1000000))
|
||||
end
|
||||
|
||||
-- FM Radio PR4G
|
||||
---------------------------------------------------
|
||||
@@ -663,7 +680,7 @@ function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--ExportScript.genericRadioConf[3]['Preset']['ButtonID2'] = 3002 -- preset button id from cklickable.lua
|
||||
-- Preset based on switchlogic on clickabledata.lua
|
||||
-- [273] = "%.3f", -- FM RADIO - Chanel Selector {0.0,0.143,0.286,0.429,0.572,0.715,0.858,1.0} -- laut clickabledata.lua
|
||||
ExportScript.genericRadioConf[3]['Preset']['List'] = {[0.0]="1",[0.143]="2",[0.286]="3",[0.429]="4",[0.572]="5",[0.715]="6",[0.858]="0",[1.0]="9"}
|
||||
ExportScript.genericRadioConf[3]['Preset']['List'] = {[0.0]="1",[0.143]="2",[0.286]="3",[0.429]="4",[0.572]="5",[0.715]="6",[0.858]="0",[1.0]="-"}
|
||||
ExportScript.genericRadioConf[3]['Preset']['Step'] = 0.143 -- minimal step for preset change
|
||||
--ExportScript.genericRadioConf[3]['Preset']['Step2'] = -0.01 -- minimal step for preset change
|
||||
--ExportScript.genericRadioConf[3]['Squelch'] = {} -- squelch switch active
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- SA342M
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.SA342M = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
@@ -47,7 +47,7 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
[165] = "%0.1f", -- ADF_nav2_dec {0,1} 000.X khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
-- ADF Gauge
|
||||
[113] = "%.4f", -- ADF_Fond Compass rose {0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360}{0.0,0.028,0.055,0.084,0.111,0.138,0.166,0.194,0.222,0.249,0.2775,0.305,0.332,0.36,0.388,0.415,0.4434,0.47,0.498,0.526,0.555,0.583,0.611,0.638,0.6665,0.694,0.722,0.75,0.776,0.805,0.833,0.861,0.8885,0.917,0.944,0.972,1.0}
|
||||
[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
--[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
[103] = "%.4f", -- ADF_Aiguille_fine Heading Needle fine {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
[107] = "%.1f", -- ADF_FlagCAP {0,1}
|
||||
[109] = "%.1f", -- ADF_FlagBut {0,1}
|
||||
@@ -57,9 +57,10 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
[112] = "%0.1f", -- ADF_compteur_Unit {0,1} 00X {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
-- CLOCK
|
||||
[41] = "%.3f", -- CLOCK_HOUR {0,1,2,3,4,5,6,7,8,9,10,11,12}{0,0.081,0.162,0.245,0.33,0.415,0.501,0.587,0.672,0.756,0.838,0.919,1}
|
||||
[42] = "%.3f", -- CLOCK_MINUTE {0,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,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[43] = "%.3f", -- CLOCK_SECOND {0,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,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[42] = "%.3f", -- CLOCK_SECOND {0,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,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[43] = "%.3f", -- CLOCK_MINUTE {0,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,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[44] = "%.3f", -- CLOCK_MINI {0,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}{0,0.032,0.065,0.098,0.131,0.164,0.198,0.231,0.264,0.297,0.331,0.364,0.397,0.43,0.464,0.497,0.523,0.551,0.576,0.605,0.63,0.659,0.684,0.714,0.758,0.796,0.838,0.879,0.92,0.958,1}
|
||||
[210] = "%.4f", -- Clock_ExtCouronne
|
||||
-- Wipers
|
||||
--[547] = "%.4f", -- EGPilote {-1,1}
|
||||
--[546] = "%.4f", -- EGCopilote {-1,1}
|
||||
@@ -77,7 +78,7 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
-- radar altimetre
|
||||
[94] = "%.4f", -- Radar_Altimeter {0,5,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850}{0,0.019,0.035,0.072,0.109,0.147,0.18,0.214,0.247,0.283,0.316,0.345,0.376,0.407,0.438,0.469,0.501,0.564,0.606,0.648,0.676,0.706,0.732,0.756,0.775,0.794,0.811,0.829,0.843,0.858,0.87}
|
||||
[93] = "%.4f", -- DangerRALT_index {0,5,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850}{0.0,0.0175,0.0338,0.0715,0.109,0.147,0.182,0.215,0.247,0.282,0.315,0.3445,0.377,0.407,0.439,0.47,0.5005,0.5628,0.6052,0.646,0.675,0.7058,0.7315,0.755,0.7747,0.793,0.8097,0.8272,0.8425,0.8575,0.8693}
|
||||
[97] = "%.f", -- RAltlamp {0,1}
|
||||
--[97] = "%.f", -- RAltlamp {0,1}
|
||||
[98] = "%.f", -- RAlt_flag_Panne OFF Flag{0,1}
|
||||
[99] = "%.1f", -- RAlt_flag_MA A (Test) Flag{0,1}
|
||||
[91] = "%.1f", -- RAlt_knob_MA Power/Test Knop{0,1}
|
||||
@@ -415,6 +416,18 @@ function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
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))
|
||||
]]
|
||||
--[97] = "%.f", -- RAltlamp {0,1}
|
||||
ExportScript.Tools.SendData(97, (mainPanelDevice:get_argument_value(97) > 0.009 and 1 or 0))
|
||||
|
||||
--[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
local ADF_Aiguille_large = mainPanelDevice:get_argument_value(102)
|
||||
if ADF_Aiguille_large ~= 0 then
|
||||
ADF_Aiguille_large = ADF_Aiguille_large + 0.5
|
||||
if ADF_Aiguille_large > 1 then
|
||||
ADF_Aiguille_large = ADF_Aiguille_large - 1.0
|
||||
end
|
||||
end
|
||||
ExportScript.Tools.SendData(102, string.format("%.4f", ADF_Aiguille_large))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
@@ -605,7 +618,7 @@ function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
ExportScript.genericRadioConf[1]['maxFrequency'] = 399.975 -- highest frequency
|
||||
ExportScript.genericRadioConf[1]['Power'] = {} -- power button active
|
||||
ExportScript.genericRadioConf[1]['Power']['ButtonID'] = 3001 -- power button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOn'] = 0.1 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOn'] = 0.167 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOff'] = 0.0 -- power off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Volume'] = {} -- volume knob active
|
||||
--ExportScript.genericRadioConf[1]['Volume']['ButtonID'] = 3011 -- volume button id from cklickable.lua
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- SA342Mistral
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.SA342Mistral = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
@@ -47,7 +47,7 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
[165] = "%0.1f", -- ADF_nav2_dec {0,1} 000.X khz {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
-- ADF Gauge
|
||||
[113] = "%.4f", -- ADF_Fond Compass rose {0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360}{0.0,0.028,0.055,0.084,0.111,0.138,0.166,0.194,0.222,0.249,0.2775,0.305,0.332,0.36,0.388,0.415,0.4434,0.47,0.498,0.526,0.555,0.583,0.611,0.638,0.6665,0.694,0.722,0.75,0.776,0.805,0.833,0.861,0.8885,0.917,0.944,0.972,1.0}
|
||||
[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
--[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
[103] = "%.4f", -- ADF_Aiguille_fine Heading Needle fine {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
[107] = "%.1f", -- ADF_FlagCAP {0,1}
|
||||
[109] = "%.1f", -- ADF_FlagBut {0,1}
|
||||
@@ -57,9 +57,10 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
[112] = "%0.1f", -- ADF_compteur_Unit {0,1} 00X {0,1,2,3,4,5,6,7,8,9,0}{0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}
|
||||
-- CLOCK
|
||||
[41] = "%.3f", -- CLOCK_HOUR {0,1,2,3,4,5,6,7,8,9,10,11,12}{0,0.081,0.162,0.245,0.33,0.415,0.501,0.587,0.672,0.756,0.838,0.919,1}
|
||||
[42] = "%.3f", -- CLOCK_MINUTE {0,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,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[43] = "%.3f", -- CLOCK_SECOND {0,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,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[42] = "%.3f", -- CLOCK_SECOND {0,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,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[43] = "%.3f", -- CLOCK_MINUTE {0,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,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60}{0,0.017,0.033,0.049,0.065,0.08,0.098,0.115,0.131,0.147,0.163,0.18,0.195,0.213,0.23,0.246,0.262,0.279,0.296,0.313,0.33,0.346,0.363,0.38,0.397,0.415,0.431,0.449,0.466,0.483,0.501,0.518,0.535,0.552,0.569,0.586,0.604,0.621,0.638,0.655,0.672,0.688,0.705,0.722,0.739,0.755,0.771,0.788,0.804,0.821,0.838,0.853,0.87,0.885,0.902,0.919,0.934,0.95,0.967,0.984,1}
|
||||
[44] = "%.3f", -- CLOCK_MINI {0,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}{0,0.032,0.065,0.098,0.131,0.164,0.198,0.231,0.264,0.297,0.331,0.364,0.397,0.43,0.464,0.497,0.523,0.551,0.576,0.605,0.63,0.659,0.684,0.714,0.758,0.796,0.838,0.879,0.92,0.958,1}
|
||||
[210] = "%.4f", -- Clock_ExtCouronne
|
||||
-- Wipers
|
||||
--[547] = "%.4f", -- EGPilote {-1,1}
|
||||
--[546] = "%.4f", -- EGCopilote {-1,1}
|
||||
@@ -77,7 +78,7 @@ ExportScript.ConfigEveryFrameArguments =
|
||||
-- radar altimetre
|
||||
[94] = "%.4f", -- Radar_Altimeter {0,5,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850}{0,0.019,0.035,0.072,0.109,0.147,0.18,0.214,0.247,0.283,0.316,0.345,0.376,0.407,0.438,0.469,0.501,0.564,0.606,0.648,0.676,0.706,0.732,0.756,0.775,0.794,0.811,0.829,0.843,0.858,0.87}
|
||||
[93] = "%.4f", -- DangerRALT_index {0,5,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850}{0.0,0.0175,0.0338,0.0715,0.109,0.147,0.182,0.215,0.247,0.282,0.315,0.3445,0.377,0.407,0.439,0.47,0.5005,0.5628,0.6052,0.646,0.675,0.7058,0.7315,0.755,0.7747,0.793,0.8097,0.8272,0.8425,0.8575,0.8693}
|
||||
[97] = "%.f", -- RAltlamp {0,1}
|
||||
--[97] = "%.f", -- RAltlamp {0,1}
|
||||
[98] = "%.f", -- RAlt_flag_Panne OFF Flag{0,1}
|
||||
[99] = "%.1f", -- RAlt_flag_MA A (Test) Flag{0,1}
|
||||
[91] = "%.1f", -- RAlt_knob_MA Power/Test Knop{0,1}
|
||||
@@ -403,6 +404,18 @@ function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
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))
|
||||
]]
|
||||
--[97] = "%.f", -- RAltlamp {0,1}
|
||||
ExportScript.Tools.SendData(97, (mainPanelDevice:get_argument_value(97) > 0.009 and 1 or 0))
|
||||
|
||||
--[102] = "%.4f", -- ADF_Aiguille_large Heading Needle large {-360.0,0.0,360.0}{-1.0,0.0,1.0}
|
||||
local ADF_Aiguille_large = mainPanelDevice:get_argument_value(102)
|
||||
if ADF_Aiguille_large ~= 0 then
|
||||
ADF_Aiguille_large = ADF_Aiguille_large + 0.5
|
||||
if ADF_Aiguille_large > 1 then
|
||||
ADF_Aiguille_large = ADF_Aiguille_large - 1.0
|
||||
end
|
||||
end
|
||||
ExportScript.Tools.SendData(102, string.format("%.4f", ADF_Aiguille_large))
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
@@ -593,7 +606,7 @@ function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
ExportScript.genericRadioConf[1]['maxFrequency'] = 399.975 -- highest frequency
|
||||
ExportScript.genericRadioConf[1]['Power'] = {} -- power button active
|
||||
ExportScript.genericRadioConf[1]['Power']['ButtonID'] = 3001 -- power button id from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOn'] = 0.1 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOn'] = 0.167 -- power on value from cklickable.lua
|
||||
ExportScript.genericRadioConf[1]['Power']['ValueOff'] = 0.0 -- power off value from cklickable.lua
|
||||
--ExportScript.genericRadioConf[1]['Volume'] = {} -- volume knob active
|
||||
--ExportScript.genericRadioConf[1]['Volume']['ButtonID'] = 3011 -- volume button id from cklickable.lua
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- Spitfire LFMk IX
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.SpitfireLFMkIX = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
|
||||
@@ -0,0 +1,268 @@
|
||||
-- Spitfire LFMk IX CW
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.SpitfireLFMkIXCW = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
--[[
|
||||
every frames arguments
|
||||
based of "mainpanel_init.lua"
|
||||
Example (http://www.lua.org/manual/5.1/manual.html#pdf-string.format)
|
||||
[DeviceID] = "Format"
|
||||
[4] = "%.4f", <- floating-point number with 4 digits after point
|
||||
[19] = "%0.1f", <- floating-point number with 1 digit after point
|
||||
[129] = "%1d", <- decimal number
|
||||
[5] = "%.f", <- floating point number rounded to a decimal number
|
||||
]]
|
||||
-- Flight Instruments
|
||||
[11] = "%.4f", -- OxygenDeliveryGauge {0.0, 0.4}{0.0, 4000.0}
|
||||
[12] = "%.4f", -- OxygenSupplyGauge
|
||||
[17] = "%.4f", -- TrimGauge {-1.0, 1.0}
|
||||
[18] = "%.4f", -- PneumaticPressureGauge {0.0, 1.0}{0.0, 600.0}
|
||||
[19] = "%.4f", -- Left wheel brake pressure gauge {0.0, 1.0}{0.0, 130.0}
|
||||
[20] = "%.4f", -- Right wheel brake pressure gauge {0.0, 1.0}{0.0, 130.0}
|
||||
[21] = "%.4f", -- Airspeed gauge {0.0, 0.5}{0.0, 500.0}
|
||||
[23] = "%.4f", -- Attitude Horizon Bank {-1.0, 1.0}
|
||||
[24] = "%.4f", -- Attitude Horizon Pitch {-1.0, 1.0}
|
||||
[25] = "%.4f", -- Variometer gauge {-1.0, 1.0}{-4000.0, 4000.0}
|
||||
[26] = "%.4f", -- Altimeter gauge Hundreds {0.0, 1.0}{0.0, 10.0}
|
||||
[27] = "%.4f", -- Altimeter gauge Thousands {0.0, 1.0}{0.0, 10.0}
|
||||
[28] = "%.4f", -- Altimeter gauge Tens Thousabds {0.0, 1.0}{0.0, 10.0}
|
||||
[29] = "%.4f", -- Altimeter gauge Pressure {0.0, 1.0}{800.0, 1050.0}
|
||||
[31] = "%.4f", -- DI gauge {0.0, 1.0}{0.0, 2.0 * 3.1415926}
|
||||
[33] = "%.4f", -- Sideslip gauge {-1.0, 1.0}
|
||||
[34] = "%.4f", -- Turn gauge {-1.0, 1.0}
|
||||
[35] = "%.4f", -- Voltmeter {0.0, 1.0}{0.0, 20.0}
|
||||
[37] = "%.4f", -- Tachometer {0.0, 0.5}{0.0, 5000.0}
|
||||
[39] = "%.4f", -- Boost gauge {0.0, 1.0}{-7.0, 24.0}
|
||||
[40] = "%.4f", -- Oil pressure gauge {0.0, 1.0}{0.0, 150.0}
|
||||
[41] = "%.4f", -- Oil temperature gauge {0.0, 1.0}{0.0, 100.0}
|
||||
[42] = "%.4f", -- Radiator temperature gauge {0.0, 0.7}{0.0, 140.0}
|
||||
[43] = "%.4f", -- Fuel contents gauge {0.0, 0.1, 1.0}{-1.0, 0.0, 37.0}
|
||||
[51] = "%.4f", -- Clock Hour
|
||||
[52] = "%.4f", -- Clock Minute
|
||||
[53] = "%.4f", -- Clock Second
|
||||
[71] = "%.4f", -- Magnetic compass CompassRoseRoll {-1.0, 1.0}{-20.0, 20.0}
|
||||
[72] = "%.4f", -- Magnetic compass CompassRosePitch {-1.0, 1.0}{-20.0, 20.0}
|
||||
[73] = "%.4f", -- Magnetic compass CompassHeading{0.0, 1.0}
|
||||
[120] = "%1d", -- Radio Lamp A
|
||||
[121] = "%1d", -- Radio Lamp B
|
||||
[122] = "%1d", -- Radio Lamp C
|
||||
[123] = "%1d", -- Radio Lamp D
|
||||
[124] = "%1d", -- Radio Lamp R
|
||||
--[131] = "%1d", -- UC_DOWN_C ???
|
||||
[49] = "%1d", -- Gear Lamp Down
|
||||
[48] = "%1d", -- Gear Lamp Up
|
||||
--[62] = "%.4f", -- ???
|
||||
--[63] = "%.4f", -- ???
|
||||
--[59] = "%.4f", -- ???
|
||||
--[45] = "%.4f" -- GUNSIGHT_RANGE ???
|
||||
}
|
||||
ExportScript.ConfigArguments =
|
||||
{
|
||||
--[[
|
||||
arguments for export in low tick interval
|
||||
based on "clickabledata.lua"
|
||||
]]
|
||||
[13] = "%1d", -- Oxygen Apparatus Controls Valve
|
||||
-- Main Panel
|
||||
[30] = "%.1f", -- Altimeter (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[32] = "%.1f", -- DI (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[44] = "%1d", -- Fuel Gauge Button
|
||||
[46] = "%1d", -- Nav. Lights Toggle
|
||||
[47] = "%1d", -- Flaps Lever
|
||||
[50] = "%1d", -- U/C Indicator Blind
|
||||
[54] = "%1d", -- Clock Setter Pinion
|
||||
[55] = "%.1f", -- Clock Setter Pinion (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[56] = "%1d", -- Magnetos Toggles 1
|
||||
[57] = "%1d", -- Magnetos Toggles 2
|
||||
[58] = "%1d", -- Supercharger Mode Toggle
|
||||
[60] = "%.1f", -- Illumination Controls Left (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[61] = "%.1f", -- Illumination Controls Right (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
[65] = "%1d", -- Starter Button
|
||||
[67] = "%1d", -- Booster Coil Button
|
||||
[69] = "%1d", -- Primer Pump
|
||||
[68] = "%.2f", -- Primer Pump (Axis) {0.0, 1.0} in 0.04 Steps
|
||||
[70] = "%1d", -- Tank Pressurizer Lever
|
||||
[74] = "%.4f", -- Magnetic Compass Ring (Axis) {0.0, 1.0} in 0.0333 Steps
|
||||
-- Gun Sight and Tertiary Weapons Controls
|
||||
[77] = "%.2f", -- Gun Sight Setter Rings Range (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[78] = "%.2f", -- Gun Sight Setter Rings Base (Axis) {0.0, 1.0} in 0.15 Steps
|
||||
[79] = "%1d", -- Gun Sight Tint Screen
|
||||
[80] = "%1d", -- Gun Sight Master Switch
|
||||
[81] = "%.1f", -- Gun Sight Dimmer (Axis) {0.0, 1.0} in 0.1 Steps
|
||||
-- Port Wall
|
||||
[145] = "%.2f", -- Elevator Trim Wheel (Axis) {-1.0, 1.0} in 0.01 Steps
|
||||
[146] = "%.1f", -- Rudder Trim Wheel (Axis) {-1.0, 1.0} in 0.1 Steps
|
||||
-- Radio Remote Channel Switcher
|
||||
[115] = "%1d", -- Off Button
|
||||
[116] = "%1d", -- A Button
|
||||
[117] = "%1d", -- B Button
|
||||
[118] = "%1d", -- C Button
|
||||
[119] = "%1d", -- D Button
|
||||
[125] = "%1d", -- Dimmer Toggle
|
||||
[155] = "%1d", -- Transmit Lock Toggle
|
||||
[156] = "%1d", -- Mode Selector
|
||||
-- Throttle Quadrant
|
||||
[126] = "%.1f", -- Throttle Lever (Axis) {-1.0, 1.0} in 0.1 Steps
|
||||
[128] = "%1d", -- Bomb Drop Button
|
||||
[129] = "%.1f", -- Airscrew Lever (Axis) {-1.0, 1.0} in 0.1 Steps
|
||||
[130] = "%1d", -- Mix Cut-Off Lever
|
||||
[131] = "%1d", -- U/C Indicator Cut-Off Toggle
|
||||
--
|
||||
[133] = "%1d", -- Radiator Control Toggle
|
||||
[134] = "%1d", -- Pitot Heater Toggle
|
||||
[135] = "%1d", -- Fuel Pump Toggle
|
||||
[137] = "%1d", -- Carb. Air Control Lever
|
||||
[158] = "%1d", -- Oil Diluter Button
|
||||
[160] = "%1d", -- Supercharger Mode Test Button
|
||||
[162] = "%1d", -- Radiator Flap Test Button
|
||||
-- Stbd. Wall
|
||||
[87] = "%1d", -- De-Icer Lever
|
||||
[88] = "%1d", -- U/C Emergency Release Lever
|
||||
[90] = "%1d", -- Wobble Type Fuel Pump
|
||||
-- Wobble Type Fuel Pump
|
||||
[92] = "%.1f", -- Upward Lamp Mode Selector {0.0,0.5,1.0}
|
||||
[93] = "%.1f", -- Downward Lamp Mode Selector {0.0,0.5,1.0}
|
||||
[94] = "%1d", -- Morse Key
|
||||
--
|
||||
[148] = "%1d", -- U/C Lever
|
||||
-- I.F.F. Control Box
|
||||
[106] = "%1d", -- I.F.F. Upper Toggle (Type B)
|
||||
[107] = "%1d", -- I.F.F. Lower Toggle (Type D)
|
||||
[109] = "%1d", -- I.F.F. Fore Button (0)
|
||||
[110] = "%1d", -- I.F.F. Aft Button (1)
|
||||
-- Fuel Cocks & Tertiary
|
||||
[100] = "%1d", -- Fuel Cock
|
||||
[98] = "%1d", -- Droptank Cock
|
||||
[99] = "%1d", -- Droptank Release Handle
|
||||
-- Canopy Controls
|
||||
[149] = "%1d", -- Cockpit Open/Close Control
|
||||
[140] = "%1d", -- Cockpit Jettison Pull Ball
|
||||
[147] = "%1d" -- Cockpit Side Door Open/Close Control
|
||||
}
|
||||
|
||||
-----------------------------
|
||||
-- HIGH IMPORTANCE EXPORTS --
|
||||
-- done every export event --
|
||||
-----------------------------
|
||||
|
||||
-- Pointed to by ProcessIkarusDCSHighImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
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))
|
||||
]]
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigHighImportance(mainPanelDevice)
|
||||
--[[
|
||||
every frame export to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy((UHF_RADIO:get_frequency()/1000000))) -- ExportScript.Tools.RoundFreqeuncy(frequency (MHz|KHz), format ("7.3"), PrefixZeros (false), LeastValue (0.025))
|
||||
]]
|
||||
end
|
||||
|
||||
-----------------------------------------------------
|
||||
-- LOW IMPORTANCE EXPORTS --
|
||||
-- done every gExportLowTickInterval export events --
|
||||
-----------------------------------------------------
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSConfigLowImportance
|
||||
function ExportScript.ProcessIkarusDCSConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to Ikarus
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local lUHFRadio = GetDevice(54)
|
||||
ExportScript.Tools.SendData("ExportID", "Format")
|
||||
ExportScript.Tools.SendData(2000, string.format("%7.3f", lUHFRadio:get_frequency()/1000000)) -- <- special function for get frequency data
|
||||
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))
|
||||
]]
|
||||
-- Cockpit Light
|
||||
ExportScript.Tools.IkarusCockpitLights(mainPanelDevice, {163, 62, 63})
|
||||
-- Gauges light, left panel light, right panel light
|
||||
end
|
||||
|
||||
function ExportScript.ProcessDACConfigLowImportance(mainPanelDevice)
|
||||
--[[
|
||||
export in low tick interval to DAC
|
||||
Example from A-10C
|
||||
Get Radio Frequencies
|
||||
get data from device
|
||||
local UHF_RADIO = GetDevice(54)
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format")
|
||||
ExportScript.Tools.SendDataDAC("ExportID", "Format", HardwareConfigID)
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", UHF_RADIO:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("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.WriteToLog('list_cockpit_params(): '..ExportScript.Tools.dump(list_cockpit_params()))
|
||||
ExportScript.Tools.WriteToLog('CMSP: '..ExportScript.Tools.dump(list_indication(7)))
|
||||
|
||||
-- list_indication get tehe value of cockpit displays
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 0, 20, 1 do
|
||||
ltmp1 = list_indication(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
end
|
||||
]]
|
||||
--[[
|
||||
-- getmetatable get function name from devices
|
||||
local ltmp1 = 0
|
||||
for ltmp2 = 1, 70, 1 do
|
||||
ltmp1 = GetDevice(ltmp2)
|
||||
ExportScript.Tools.WriteToLog(ltmp2..': '..ExportScript.Tools.dump(ltmp1))
|
||||
ExportScript.Tools.WriteToLog(ltmp2..' (metatable): '..ExportScript.Tools.dump(getmetatable(ltmp1)))
|
||||
end
|
||||
]]
|
||||
|
||||
-- VHF_Radio
|
||||
local lVHF_Radio = GetDevice(15)
|
||||
if lVHF_Radio:is_on() then
|
||||
ExportScript.Tools.SendDataDAC("2000", string.format("%7.3f", lVHF_Radio:get_frequency()/1000000))
|
||||
ExportScript.Tools.SendDataDAC("2000", ExportScript.Tools.RoundFreqeuncy(lVHF_Radio:get_frequency()/1000000))
|
||||
else
|
||||
ExportScript.Tools.SendDataDAC("2000", " ")
|
||||
end
|
||||
|
||||
--[[
|
||||
[115] = "%1d", -- Off Button
|
||||
[116] = "%1d", -- A Button
|
||||
[117] = "%1d", -- B Button
|
||||
[118] = "%1d", -- C Button
|
||||
[119] = "%1d", -- D Button]]
|
||||
local lVHF_Radio_PRESET = ""
|
||||
if mainPanelDevice:get_argument_value(116) > 0.8 then
|
||||
lVHF_Radio_PRESET = 1
|
||||
elseif mainPanelDevice:get_argument_value(117) > 0.8 then
|
||||
lVHF_Radio_PRESET = 2
|
||||
elseif mainPanelDevice:get_argument_value(118) > 0.8 then
|
||||
lVHF_Radio_PRESET = 3
|
||||
elseif mainPanelDevice:get_argument_value(119) > 0.8 then
|
||||
lVHF_Radio_PRESET = 4
|
||||
else
|
||||
lVHF_Radio_PRESET = ""
|
||||
end
|
||||
ExportScript.Tools.SendDataDAC("2001", lVHF_Radio_PRESET)
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Custom functions --
|
||||
-----------------------------
|
||||
@@ -1,7 +1,7 @@
|
||||
-- Su-25A Export
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.Su25 = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
@@ -90,7 +90,7 @@ function ExportScript.ProcessIkarusFCHighImportanceConfig()
|
||||
ExportScript.AF.FC_Russian_RadarAltimeter_1500m(100)
|
||||
|
||||
-- Barometric Altimeter
|
||||
ExportScript.AF.FC_Russian_BarometricAltimeter_late()
|
||||
ExportScript.AF.FC_Russian_BarometricAltimeter_late_special()
|
||||
|
||||
-- Tachometer (RPM)
|
||||
ExportScript.AF.FC_Russian_EngineRPM()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- Su-25T Export
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.Su25T = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
@@ -19,8 +19,8 @@ function ExportScript.ProcessIkarusFCHighImportanceConfig()
|
||||
local lLatitude = myData.LatLongAlt.Lat -- LATITUDE
|
||||
local lLongitude = myData.LatLongAlt.Long -- LONGITUDE
|
||||
|
||||
local lEngineTempLeft = LoGetEngineInfo().Temperature.left -- ENG1 EGT ºC
|
||||
local lEngineTempRight = LoGetEngineInfo().Temperature.right -- ENG2 EGT ºC
|
||||
local lEngineTempLeft = LoGetEngineInfo().Temperature.left -- ENG1 EGT ?C
|
||||
local lEngineTempRight = LoGetEngineInfo().Temperature.right -- ENG2 EGT ?C
|
||||
--[[
|
||||
local lBasicAtmospherePressure = LoGetBasicAtmospherePressure() -- BAROMETRIC PRESSURE
|
||||
local lAltBar = LoGetAltitudeAboveSeaLevel() -- ALTITUDE SEA LEVEL (Meter)
|
||||
@@ -88,7 +88,7 @@ function ExportScript.ProcessIkarusFCHighImportanceConfig()
|
||||
ExportScript.AF.FC_Russian_RadarAltimeter_1500m(100)
|
||||
|
||||
-- Barometric Altimeter
|
||||
ExportScript.AF.FC_Russian_BarometricAltimeter_late()
|
||||
ExportScript.AF.FC_Russian_BarometricAltimeter_late_special()
|
||||
|
||||
-- Tachometer (RPM)
|
||||
ExportScript.AF.FC_Russian_EngineRPM()
|
||||
@@ -115,8 +115,8 @@ end
|
||||
|
||||
function ExportScript.ProcessIkarusFCLowImportanceConfig()
|
||||
local lFunctionTyp = "Ikarus" -- function type for shared function
|
||||
-- Weapon Panel
|
||||
ExportScript.AF.FC_WeaponPanel_SU25(lFunctionTyp)
|
||||
-- Weapon Panel
|
||||
ExportScript.AF.FC_WeaponPanel_SU25(lFunctionTyp)
|
||||
|
||||
-- SPO15 Radar Warning Reciver
|
||||
ExportScript.AF.FC_SPO15RWR(lFunctionTyp)
|
||||
@@ -146,7 +146,7 @@ function ExportScript.ProcessIkarusFCLowImportanceConfig()
|
||||
|
||||
-- Wheelbrakes Hydraulic Pressure Right
|
||||
ExportScript.AF.FC_OneNeedleGauge(lMechInfo.wheelbrakes.value, 240, 88)
|
||||
end
|
||||
end
|
||||
|
||||
-- (x < 0 and 'negative' or 'non-negative')
|
||||
--[[
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- Su-27 Export
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.Su27 = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- Su-33 Export
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.FoundFCModule = true
|
||||
ExportScript.Version.Su33 = "1.2.1"
|
||||
|
||||
-- auxiliary function
|
||||
dofile(ExportScript.Config.ExportModulePath.."FC_AuxiliaryFuntions.lua")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- TF-51D Export
|
||||
-- Version 1.0.2
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.TF51D = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- Uh-1H Export
|
||||
-- Version 1.0.2
|
||||
-- Uh-1H
|
||||
|
||||
ExportScript.FoundDCSModule = true
|
||||
ExportScript.Version.UH1H = "1.2.1"
|
||||
|
||||
ExportScript.ConfigEveryFrameArguments =
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
-- Ikarus and D.A.C. Export Script
|
||||
-- Version 1.0.1
|
||||
--
|
||||
-- Map Config File
|
||||
--
|
||||
@@ -14,6 +13,8 @@
|
||||
-- Lat2 and Long2 contain the coordinates of the lower right corner.
|
||||
--
|
||||
|
||||
ExportScript.Version.Maps = "1.2.1"
|
||||
|
||||
-- Maps
|
||||
ExportScript.Maps = {}
|
||||
-- Caucasus Map
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
-- Ikarus and D.A.C. Export Script
|
||||
-- Version 1.0.2
|
||||
--
|
||||
-- Tools
|
||||
--
|
||||
-- Copyright by Michael aka McMicha 2014 - 2017
|
||||
-- Copyright by Michael aka McMicha 2014 - 2018
|
||||
-- Contact dcs2arcaze.micha@farbpigmente.org
|
||||
|
||||
ExportScript.Tools = {}
|
||||
ExportScript.Version.Tools = "1.2.1"
|
||||
|
||||
function ExportScript.Tools.WriteToLog(message)
|
||||
if ExportScript.logFile then
|
||||
@@ -20,6 +20,44 @@ function ExportScript.Tools.WriteToLog(message)
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.Tools.createUDPSender()
|
||||
ExportScript.socket = require("socket")
|
||||
|
||||
local lcreateUDPSender = ExportScript.socket.protect(function()
|
||||
ExportScript.UDPsender = ExportScript.socket.udp()
|
||||
ExportScript.socket.try(ExportScript.UDPsender:setsockname("*", 0))
|
||||
--ExportScript.socket.try(ExportScript.UDPsender:settimeout(.004)) -- set the timeout for reading the socket; 250 fps
|
||||
end)
|
||||
|
||||
local ln, lerror = lcreateUDPSender()
|
||||
if lerror ~= nil then
|
||||
ExportScript.Tools.WriteToLog("createUDPSender protect: "..ExportScript.Tools.dump(ln)..", "..ExportScript.Tools.dump(lerror))
|
||||
return
|
||||
end
|
||||
|
||||
ExportScript.Tools.WriteToLog("Create UDPSender")
|
||||
end
|
||||
|
||||
function ExportScript.Tools.createUDPListner()
|
||||
if ExportScript.Config.Listener then
|
||||
ExportScript.socket = require("socket")
|
||||
|
||||
local lcreateUDPListner = ExportScript.socket.protect(function()
|
||||
ExportScript.UDPListener = ExportScript.socket.udp()
|
||||
ExportScript.socket.try(ExportScript.UDPListener:setsockname("*", ExportScript.Config.ListenerPort))
|
||||
ExportScript.socket.try(ExportScript.UDPListener:settimeout(.001)) -- set the timeout for reading the socket; 250 fps
|
||||
end)
|
||||
|
||||
local ln, lerror = lcreateUDPListner()
|
||||
if lerror ~= nil then
|
||||
ExportScript.Tools.WriteToLog("createUDPListner protect: "..ExportScript.Tools.dump(ln)..", "..ExportScript.Tools.dump(lerror))
|
||||
return
|
||||
end
|
||||
|
||||
ExportScript.Tools.WriteToLog("Create UDPListner")
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.Tools.ProcessInput()
|
||||
local lCommand, lCommandArgs, lDevice
|
||||
-- C1,3001,4
|
||||
@@ -28,8 +66,30 @@ function ExportScript.Tools.ProcessInput()
|
||||
-- lCommandArgs[2] = 3001 => ButtonID
|
||||
-- lCommandArgs[3] = 4 => Value
|
||||
if ExportScript.Config.Listener then
|
||||
local lInput,from,port = ExportScript.UDPListener:receivefrom()
|
||||
if ExportScript.Config.Debug then
|
||||
--local lInput,from,port = ExportScript.UDPListener:receivefrom()
|
||||
ExportScript.UDPListenerValues = {}
|
||||
|
||||
local lUDPListenerReceivefrom = ExportScript.socket.protect(function()
|
||||
--[[
|
||||
local try = ExportScript.socket.newtry(function()
|
||||
ExportScript.UDPListener:close()
|
||||
ExportScript.Tools.createUDPListner()
|
||||
end)
|
||||
ExportScript.UDPListenerValues.Input, ExportScript.UDPListenerValues.from, ExportScript.UDPListenerValues.port = try(ExportScript.UDPListener:receivefrom())
|
||||
]] -- Bei einer newtry Funktion wird im fehlerfall deren inhalt ausgeführt.
|
||||
ExportScript.UDPListenerValues.Input, ExportScript.UDPListenerValues.from, ExportScript.UDPListenerValues.port = ExportScript.socket.try(ExportScript.UDPListener:receivefrom())
|
||||
end)
|
||||
|
||||
local ln, lerror = lUDPListenerReceivefrom()
|
||||
if lerror ~= nil and lerror ~= "timeout" then
|
||||
ExportScript.Tools.WriteToLog("UDPListenerReceivefrom protect: "..ExportScript.Tools.dump(ln)..", "..ExportScript.Tools.dump(lerror))
|
||||
ExportScript.UDPListener:close()
|
||||
ExportScript.Tools.createUDPListner()
|
||||
end
|
||||
|
||||
local lInput, from, port = ExportScript.UDPListenerValues.Input, ExportScript.UDPListenerValues.from, ExportScript.UDPListenerValues.port
|
||||
|
||||
if ExportScript.Config.SocketDebug then
|
||||
ExportScript.Tools.WriteToLog("lInput: "..ExportScript.Tools.dump(lInput)..", from: "..ExportScript.Tools.dump(from)..", port: "..ExportScript.Tools.dump(port))
|
||||
end
|
||||
if lInput then
|
||||
@@ -52,29 +112,55 @@ function ExportScript.Tools.ProcessInput()
|
||||
|
||||
if (lCommand == "C") then
|
||||
lCommandArgs = ExportScript.Tools.StrSplit(string.sub(lInput,2),",")
|
||||
lDevice = GetDevice(lCommandArgs[1])
|
||||
if lDevice ~= "1000" then
|
||||
if type(lDevice) == "table" then
|
||||
lDevice:performClickableAction(lCommandArgs[2],lCommandArgs[3])
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("Verarbeite fuer Device: "..lCommandArgs[1]..", ButtonID: "..lCommandArgs[2]..", mit Wert: "..lCommandArgs[3])
|
||||
end
|
||||
end
|
||||
elseif lDevice == "1000" then
|
||||
--ExportScript.genericRadio(key, value)
|
||||
ExportScript.genericRadio(lCommandArgs[2],lCommandArgs[3])
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("Verarbeite fuer genericRadio, ButtonID: "..lCommandArgs[2]..", mit Wert: "..lCommandArgs[3])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
lDeviceID = tonumber(lCommandArgs[1])
|
||||
if lDeviceID < 1000 then
|
||||
-- DCS Modules
|
||||
lDevice = GetDevice(lCommandArgs[1])
|
||||
if ExportScript.FoundDCSModule and type(lDevice) == "table" then
|
||||
lDevice:performClickableAction(lCommandArgs[2],lCommandArgs[3])
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("performClickableAction for Device: "..lCommandArgs[1]..", ButtonID: "..lCommandArgs[2]..", Value: "..lCommandArgs[3])
|
||||
end
|
||||
end
|
||||
elseif lDeviceID == 1000 then
|
||||
-- ExportScript.genericRadio(key, value)
|
||||
if ExportScript.FoundDCSModule then
|
||||
ExportScript.genericRadio(lCommandArgs[2],lCommandArgs[3])
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("genericRadio, ButtonID: "..lCommandArgs[2]..", Value: "..lCommandArgs[3])
|
||||
end
|
||||
end
|
||||
elseif lDeviceID == 2000 then
|
||||
-- Flaming Cliffs Module (Buttons)
|
||||
if ExportScript.FoundFCModule then
|
||||
-- ComamndID > 3000, because DAC or Ikarus add 300 to CommandID
|
||||
local lComandID = (tonumber(lCommandArgs[2]) - 3000)
|
||||
if tonumber(lCommandArgs[3]) == 1.0 then
|
||||
LoSetCommand(lComandID)
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("LoSetCommand, CommandID: "..lComandID)
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif lDeviceID == 2001 then
|
||||
-- Flaming Cliffs Module (analog axies)
|
||||
if ExportScript.FoundFCModule then
|
||||
-- ComamndID > 3000, because DAC or Ikarus add 3000 to CommandID
|
||||
local lComandID = (tonumber(lCommandArgs[2]) - 3000)
|
||||
LoSetCommand(lComandID, lCommandArgs[3])
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("LoSetCommand, CommandID: "..lComandID..", Value: "..lCommandArgs[3])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.Tools.ProcessOutput()
|
||||
local coStatus
|
||||
local currentTime = LoGetModelTime()
|
||||
--local currentTime = LoGetModelTime()
|
||||
|
||||
local lMyInfo = LoGetSelfData()
|
||||
if lMyInfo ~= nil then
|
||||
@@ -91,7 +177,7 @@ function ExportScript.Tools.ProcessOutput()
|
||||
|
||||
lDevice:update_arguments()
|
||||
|
||||
if currentTime - ExportScript.lastExportTimeHI > ExportScript.Config.ExportInterval then
|
||||
--if currentTime - ExportScript.lastExportTimeHI > ExportScript.Config.ExportInterval then
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("run hight importance export universally")
|
||||
ExportScript.Tools.ProcessArguments(lDevice, ExportScript.EveryFrameArguments) -- Module arguments as appropriate
|
||||
@@ -125,6 +211,7 @@ function ExportScript.Tools.ProcessOutput()
|
||||
ExportScript.Tools.ResetChangeValuesDAC()
|
||||
end
|
||||
if ExportScript.Config.IkarusExport then
|
||||
ExportScript.Tools.WriteToLog("reset dcs ikarus")
|
||||
ExportScript.Tools.ResetChangeValues()
|
||||
end
|
||||
ExportScript.FirstNewDataSend = false
|
||||
@@ -132,10 +219,12 @@ function ExportScript.Tools.ProcessOutput()
|
||||
ExportScript.FirstNewDataSendCount = ExportScript.FirstNewDataSendCount - 1
|
||||
end
|
||||
|
||||
ExportScript.lastExportTimeHI = currentTime
|
||||
end
|
||||
--ExportScript.lastExportTimeHI = currentTime
|
||||
ExportScript.lastExportTimeHI = ExportScript.lastExportTimeHI + ExportScript.Config.ExportInterval
|
||||
--end
|
||||
|
||||
if currentTime - ExportScript.lastExportTimeLI > ExportScript.Config.ExportLowTickInterval then
|
||||
--if currentTime - ExportScript.lastExportTimeLI > ExportScript.Config.ExportLowTickInterval then
|
||||
if ExportScript.lastExportTimeHI > ExportScript.Config.ExportLowTickInterval then
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("run low importance export universally")
|
||||
ExportScript.Tools.ProcessArguments(lDevice, ExportScript.Arguments) -- Module arguments as appropriate
|
||||
@@ -164,7 +253,8 @@ function ExportScript.Tools.ProcessOutput()
|
||||
end
|
||||
end
|
||||
|
||||
ExportScript.lastExportTimeLI = currentTime
|
||||
--ExportScript.lastExportTimeLI = currentTime
|
||||
ExportScript.lastExportTimeHI = 0
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport then
|
||||
@@ -180,7 +270,7 @@ function ExportScript.Tools.ProcessOutput()
|
||||
|
||||
ExportScript.AF.EventNumber = os.clock() --tonumber(tostring(os.clock()):gsub(".", ""))
|
||||
|
||||
if currentTime - ExportScript.lastExportTimeHI > ExportScript.Config.ExportInterval then
|
||||
--if currentTime - ExportScript.lastExportTimeHI > ExportScript.Config.ExportInterval then
|
||||
|
||||
if ExportScript.Config.IkarusExport then
|
||||
if ExportScript.Config.Debug then
|
||||
@@ -206,6 +296,7 @@ function ExportScript.Tools.ProcessOutput()
|
||||
ExportScript.Tools.ResetChangeValuesDAC()
|
||||
end
|
||||
if ExportScript.Config.IkarusExport then
|
||||
ExportScript.Tools.WriteToLog("reset fc ikarus")
|
||||
ExportScript.Tools.ResetChangeValues()
|
||||
end
|
||||
ExportScript.FirstNewDataSend = false
|
||||
@@ -213,10 +304,12 @@ function ExportScript.Tools.ProcessOutput()
|
||||
ExportScript.FirstNewDataSendCount = ExportScript.FirstNewDataSendCount - 1
|
||||
end
|
||||
|
||||
ExportScript.lastExportTimeHI = currentTime
|
||||
end
|
||||
--ExportScript.lastExportTimeHI = currentTime
|
||||
ExportScript.lastExportTimeHI = ExportScript.lastExportTimeHI + ExportScript.Config.ExportInterval
|
||||
--end
|
||||
|
||||
if currentTime - ExportScript.lastExportTimeLI > ExportScript.Config.ExportLowTickInterval then
|
||||
--if currentTime - ExportScript.lastExportTimeLI > ExportScript.Config.ExportLowTickInterval then
|
||||
if ExportScript.lastExportTimeHI > ExportScript.Config.ExportLowTickInterval then
|
||||
if ExportScript.Config.IkarusExport then
|
||||
if ExportScript.Config.Debug then
|
||||
ExportScript.Tools.WriteToLog("run low importance export Ikarus")
|
||||
@@ -237,7 +330,8 @@ function ExportScript.Tools.ProcessOutput()
|
||||
end
|
||||
end
|
||||
|
||||
ExportScript.lastExportTimeLI = currentTime
|
||||
--ExportScript.lastExportTimeLI = currentTime
|
||||
ExportScript.lastExportTimeHI = 0
|
||||
end
|
||||
|
||||
if ExportScript.Config.IkarusExport then
|
||||
@@ -270,6 +364,7 @@ function ExportScript.Tools.StrSplit(str, delim, maxNb)
|
||||
local lNb = 0
|
||||
local lLastPos
|
||||
for part, pos in string.gfind(str, lPat) do
|
||||
-- for part, pos in string.gmatch(str, lPat) do -- Lua Version > 5.1
|
||||
lNb = lNb + 1
|
||||
lResult[lNb] = part
|
||||
lLastPos = pos
|
||||
@@ -429,6 +524,7 @@ function ExportScript.Tools.SendDataDAC(id, value)
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
function ExportScript.Tools.FlushData()
|
||||
if #ExportScript.SendStrings > 0 then
|
||||
local lES_SimID = ""
|
||||
@@ -437,25 +533,85 @@ function ExportScript.Tools.FlushData()
|
||||
|
||||
local lPacket = lES_SimID .. table.concat(ExportScript.SendStrings, ExportScript.Config.IkarusSeparator) .. "\n"
|
||||
ExportScript.socket.try(ExportScript.UDPsender:sendto(lPacket, ExportScript.Config.IkarusHost, ExportScript.Config.IkarusPort))
|
||||
|
||||
if ExportScript.Config.SocketDebug then
|
||||
ExportScript.Tools.WriteToLog("FlushData: send the following data to host: "..ExportScript.Config.IkarusHost..", Port: "..ExportScript.Config.IkarusPort..", Data: "..lPacket)
|
||||
end
|
||||
|
||||
ExportScript.SendStrings = {}
|
||||
ExportScript.PacketSize = 0
|
||||
end
|
||||
else
|
||||
if ExportScript.Config.SocketDebug then
|
||||
ExportScript.Tools.WriteToLog("FlushData: nothing sent")
|
||||
end
|
||||
end
|
||||
end
|
||||
]]
|
||||
|
||||
function ExportScript.Tools.FlushData()
|
||||
local lFlushData = ExportScript.socket.protect(function()
|
||||
if #ExportScript.SendStrings > 0 then
|
||||
local lES_SimID = ""
|
||||
|
||||
lES_SimID = ExportScript.SimID
|
||||
|
||||
local lPacket = lES_SimID .. table.concat(ExportScript.SendStrings, ExportScript.Config.IkarusSeparator) .. "\n"
|
||||
--ExportScript.socket.try(ExportScript.UDPsender:sendto(lPacket, ExportScript.Config.IkarusHost, ExportScript.Config.IkarusPort))
|
||||
local try = ExportScript.socket.newtry(function() ExportScript.UDPsender:close() ExportScript.Tools.createUDPSender() ExportScript.Tools.ResetChangeValues() end)
|
||||
try(ExportScript.UDPsender:sendto(lPacket, ExportScript.Config.IkarusHost, ExportScript.Config.IkarusPort))
|
||||
|
||||
if ExportScript.Config.SocketDebug then
|
||||
ExportScript.Tools.WriteToLog("FlushData: send to host: "..ExportScript.Config.IkarusHost..", Port: "..ExportScript.Config.IkarusPort..", Data: "..lPacket)
|
||||
end
|
||||
|
||||
ExportScript.SendStrings = {}
|
||||
ExportScript.PacketSize = 0
|
||||
else
|
||||
if ExportScript.Config.SocketDebug then
|
||||
ExportScript.Tools.WriteToLog("FlushData: nothing sent")
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
local ln, lerror = lFlushData()
|
||||
if lerror ~= nil then
|
||||
ExportScript.Tools.WriteToLog("FlushData protect: "..ExportScript.Tools.dump(ln)..", "..ExportScript.Tools.dump(lerror))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function ExportScript.Tools.FlushDataDAC(hardware)
|
||||
hardware = hardware or 1
|
||||
|
||||
if ExportScript.Config.DAC[hardware] == nil then
|
||||
ExportScript.Tools.WriteToLog("unknown hardware ID '"..hardware.."'")
|
||||
ExportScript.Tools.WriteToLog("FlushDataDAC: unknown hardware ID '"..hardware.."'")
|
||||
return
|
||||
end
|
||||
|
||||
if #ExportScript.SendStringsDAC[hardware] > 0 then
|
||||
local lPacket = ExportScript.SimID .. table.concat(ExportScript.SendStringsDAC[hardware], ExportScript.Config.DAC[hardware].Separator) .. "\n"
|
||||
ExportScript.socket.try(ExportScript.UDPsender:sendto(lPacket, ExportScript.Config.DAC[hardware].Host, ExportScript.Config.DAC[hardware].SendPort))
|
||||
ExportScript.SendStringsDAC[hardware] = {}
|
||||
ExportScript.PacketSizeDAC[hardware] = 0
|
||||
end
|
||||
local lFlushDataDAC = ExportScript.socket.protect(function()
|
||||
if #ExportScript.SendStringsDAC[hardware] > 0 then
|
||||
local lPacket = ExportScript.SimID .. table.concat(ExportScript.SendStringsDAC[hardware], ExportScript.Config.DAC[hardware].Separator) .. "\n"
|
||||
--ExportScript.socket.try(ExportScript.UDPsender:sendto(lPacket, ExportScript.Config.DAC[hardware].Host, ExportScript.Config.DAC[hardware].SendPort))
|
||||
local try = ExportScript.socket.newtry(function() ExportScript.UDPsender:close() ExportScript.Tools.createUDPSender() ExportScript.Tools.ResetChangeValuesDAC() end)
|
||||
try(ExportScript.UDPsender:sendto(lPacket, ExportScript.Config.DAC[hardware].Host, ExportScript.Config.DAC[hardware].SendPort))
|
||||
|
||||
if ExportScript.Config.SocketDebug then
|
||||
ExportScript.Tools.WriteToLog("FlushDataDAC["..hardware.."]: send to host: "..ExportScript.Config.DAC[hardware].Host..", Port: "..ExportScript.Config.DAC[hardware].SendPort..", Data: "..lPacket)
|
||||
end
|
||||
|
||||
ExportScript.SendStringsDAC[hardware] = {}
|
||||
ExportScript.PacketSizeDAC[hardware] = 0
|
||||
else
|
||||
if ExportScript.Config.SocketDebug then
|
||||
ExportScript.Tools.WriteToLog("FlushDataDAC["..hardware.."]: nothing sent")
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
local ln, lerror = lFlushDataDAC()
|
||||
if lerror ~= nil then
|
||||
ExportScript.Tools.WriteToLog("FlushDataDAC protect: "..ExportScript.Tools.dump(ln)..", "..ExportScript.Tools.dump(lerror))
|
||||
end
|
||||
end
|
||||
|
||||
function ExportScript.Tools.ResetChangeValues()
|
||||
@@ -516,9 +672,14 @@ function ExportScript.Tools.SelectModule()
|
||||
end
|
||||
|
||||
ExportScript.Tools.WriteToLog("File '"..lModuleFile.."' loaded")
|
||||
|
||||
ExportScript.Tools.WriteToLog("Version:")
|
||||
for k,v in pairs(ExportScript.Version) do
|
||||
ExportScript.Tools.WriteToLog(k..": "..v)
|
||||
end
|
||||
|
||||
ExportScript.FirstNewDataSend = true
|
||||
ExportScript.FirstNewDataSendCount = 5
|
||||
ExportScript.FirstNewDataSend = ExportScript.Config.FirstNewDataSend
|
||||
ExportScript.FirstNewDataSendCount = ExportScript.Config.FirstNewDataSendCount
|
||||
|
||||
if ExportScript.FoundDCSModule then
|
||||
local lCounter = 0
|
||||
@@ -585,6 +746,11 @@ function ExportScript.Tools.SelectModule()
|
||||
ExportScript.ProcessDACLowImportance = ExportScript.ProcessDACLowImportanceNoConfig
|
||||
ExportScript.EveryFrameArguments = {}
|
||||
ExportScript.Arguments = {}
|
||||
|
||||
ExportScript.Tools.WriteToLog("Version:")
|
||||
for k,v in pairs(ExportScript.Version) do
|
||||
ExportScript.Tools.WriteToLog(k..": "..v)
|
||||
end
|
||||
ExportScript.Tools.WriteToLog("Unknown Module Name: "..lMyInfo.Name)
|
||||
end
|
||||
end
|
||||
@@ -721,9 +887,11 @@ function ExportScript.Tools.RoundFreqeuncy(Freqeuncy, Format, PrefixZeros, Least
|
||||
|
||||
tmpstring = string.format("%."..tmp2.."f", tmpstring)
|
||||
|
||||
while string.len(tmpstring) < tmp1 do
|
||||
tmpstring = " "..tmpstring
|
||||
end
|
||||
-- while string.len(tmpstring) < tmp1 do
|
||||
-- tmpstring = " "..tmpstring
|
||||
-- end
|
||||
|
||||
tmpstring = string.rep(" ", tmp1 - string.len(tmpstring))..tmpstring
|
||||
|
||||
if prefixzeros then
|
||||
tmpstring = string.gsub(tmpstring, " ", "0")
|
||||
@@ -758,6 +926,52 @@ function ExportScript.Tools.getListIndicatorValue(IndicatorID)
|
||||
return TmpReturn
|
||||
end
|
||||
|
||||
-- The function format a given string for a display
|
||||
-- String: value for show in display, maxChars: Display size (default 5), LEFTorRIGHT: flush with left "l" or right "r" site (default "r")
|
||||
function ExportScript.Tools.DisplayFormat(String, maxChars, LEFTorRight, DAC)
|
||||
local lString = String or ""
|
||||
local lmaxChars = maxChars or 5
|
||||
local lLEFTorRight = LEFTorRight or "r"
|
||||
local lDAC = DAC or false
|
||||
local lTmpLen = 0
|
||||
local lRep = " "
|
||||
|
||||
if lDAC then
|
||||
lRep = "-"
|
||||
end
|
||||
|
||||
lString = ExportScript.utf8.sub(lString, 0, lmaxChars)
|
||||
lTmpLen = ExportScript.utf8.len(lString)
|
||||
|
||||
if lTmpLen < lmaxChars then
|
||||
if string.lower(lLEFTorRight) == "l" then
|
||||
lString = lString..string.rep(" ", lmaxChars - lTmpLen)
|
||||
else
|
||||
lString = string.rep(" ", lmaxChars - lTmpLen)..lString
|
||||
end
|
||||
end
|
||||
|
||||
return lString
|
||||
end
|
||||
|
||||
function ExportScript.Tools.KeyInTable(Table, Key)
|
||||
for key, value in pairs(Table) do
|
||||
if key == Key then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function ExportScript.Tools.ValueInTable(Table, Value)
|
||||
for key, value in pairs(Table) do
|
||||
if value == Value then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
-- Pointed to by ExportScript.ProcessIkarusDCSHighImportance, if the player aircraft is something else
|
||||
function ExportScript.ProcessIkarusDCSHighImportanceNoConfig(mainPanelDevice)
|
||||
end
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
-- Ikarus and D.A.C. Export Script
|
||||
-- Version 1.0.2
|
||||
--
|
||||
-- generic Radio File
|
||||
--
|
||||
-- Copyright by Michael aka McMicha 2014
|
||||
-- Contact dcs2arcaze.micha@farbpigmente.org
|
||||
|
||||
ExportScript.Version.genericRadio = "1.2.1"
|
||||
|
||||
--[[
|
||||
-- Config and execute in function ExportScript.ProcessDACConfigLowImportance()
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user