mirror of
https://github.com/weyne85/DCS-ExportScripts.git
synced 2025-10-29 16:58:18 +00:00
Change to version 1.1.0
Add support for AV-8B N/A, Mirage 2000 and F/A-18C Hornet (BETA) Add many new useful auxiliary functions Revise network socket usage for a stable connection Introducing a new versioning scheme, 1.x.x.x Major version, x.1.x Subversion, x.x.0 Bug fixing level ...
This commit is contained in:
@@ -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.1.0"
|
||||
-- Simulation id
|
||||
ExportScript.SimID = string.format("%08x*",os.time())
|
||||
|
||||
@@ -54,23 +55,11 @@ 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
|
||||
@@ -80,6 +69,9 @@ function LuaExportStart()
|
||||
-- ExportScript.Tools.WriteToLog("Rename Error: "..lrename2)
|
||||
--end
|
||||
|
||||
ExportScript.Tools.createUDPSender()
|
||||
ExportScript.Tools.createUDPListner()
|
||||
|
||||
ExportScript.AF = {} -- Table for Auxiliary functions
|
||||
|
||||
ExportScript.NoLuaExportBeforeNextFrame = false
|
||||
|
||||
Reference in New Issue
Block a user