TheRat Posted August 22, 2011 Share Posted August 22, 2011 (edited) VB Example Sourcecode for reading DCS a10 lua data export - on our way to a Lua to serial hardware bridge This short project demonstrates how you can read the real-time data provided by the export.lua interface into your own application. Not more or less. What you then do with it is you part. What is it for? -E.g. if you want to connect “real/ hardware” gauges to you simulator you need to read the “realtime” data and pass it on to your hardware. That means read “altitude value”, convert it, pass it on to a serial port, read it with a microprocessor (Arduino), convert it to output voltage and you’re done (at least you are near) . -or you want your personal flight recorder, analyze your mission telemetry data, … I could not find a good tutorial anywhere, so I wrote this example code. Maybe there are more pilots looking for it – that’s why I release the code. What do you need? -HawTouch 1.5 (the idea to this example code came to me as I was playing with the great HawgTouch interface by ClearDark http://forums.eagle.ru/showthread.php?t=71729) -Visual Studio Express 2010 -Attached source Howto? The neccessary Export.lua IS WRITTEN BY THE HAWGTOUCH Application, but can be adjusted after it has been created. I don’t provide it with this code because it is not my work. You NEED to start Hawtouch at least ONCE and enable “Data Export” for this to work, this writes the Export.lua for you. Once this file exists, NO application is necessary anymore (also no HawgTouch)! The LuaRead currently uses a fixed port (1625) and your localhost, you can easily adjust the source to get it to run on a remote host Disclaimer: I know this piece of code is not state of the art and can be written much more efficiently, I am NOT a professional coder – but it works. It is meant solely as a starting point for further coding projects. It is enough to understand the concept. If you have more/ better code - please let me know. Outlook: I am working on the fully implemented “Lua software to serial hardware bridge”LuaRead.zip Edited August 22, 2011 by TheRat Win 7 64Bit, 2 X TM Warthog, Saitek rudder pedals, TM Cougar MFDs, 1 x PitHardware "Armament HUD Control Panel" (homegrown), TrackIR, 3x 30" w/ NVIDIA Surround, 1x 30" Helios Link to comment Share on other sites More sharing options...
Recommended Posts