Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function LuaExportStart()
- package.path = package.path..";"..lfs.currentdir().."/LuaSocket/?.lua"
- package.cpath = package.cpath..";"..lfs.currentdir().."/LuaSocket/?.dll"
- socket = require("socket")
- IPAddress = "127.0.0.1"
- Port = 31090
- MySocket = socket.try(socket.connect(IPAddress, Port))
- MySocket:setoption("tcp-nodelay",true)
- end
- function LuaExportBeforeNextFrame()
- end
- function LuaExportAfterNextFrame()
- local IAS = LoGetIndicatedAirSpeed()
- socket.try(MySocket:send(string.format("IAS: %.4f \n",IAS)))
- end
- function LuaExportStop()
- if MySocket then
- socket.try(MySocket:send("exit"))
- MySocket:close()
- end
- end
- function LuaExportActivityNextEvent(t)
- end
Advertisement
Add Comment
Please, Sign In to add comment