towsim Posted August 31, 2012 Posted August 31, 2012 Hi, does anyone know an equivalent for LoGetEngineInfo() ? After seeking around is seems, that this function does not work. It only causes the enclosing LUA script to be stopped by error. My intention is to reproduce external engine gauges, separated from the simulator in an own process. Every idea is welcome. Regards, Mike [sIGPIC][/sIGPIC]
BR55Sevas Posted August 31, 2012 Posted August 31, 2012 This function return table of data (RPM, temp, fuel...see export.lua), post your code. And what parameters you want to get? МиГ-29 Fly by wire СДУ Su-27SM second display panel https://www.youtube.com/embed/videoseries?list=PL_2GGwNpWNp_fKXfRtDhIk8s5Jf4a9XHS http://berkuts.ru Пилотажный сервер с роботом | Aerobatic server with PhantomControl
AlphaOneSix Posted September 1, 2012 Posted September 1, 2012 This function does not work in DCS. Only alternative is to get the values from the cockpit gauges, look in mainpanel_init.lua.
towsim Posted September 1, 2012 Author Posted September 1, 2012 Thanks for the reply, @BR=55=Sevas I made a first step to get the fuel status from the returned structure. But the returned structure is something.... The only result is, that the script is interrupted from that point when it returns from LoGetEngineInfo(). The Code is: local engine = LoGetEngineInfo() -- gets the table Panels.FuelStatus(engine.fuel_internal,engine.fuel_external) -- sends two values to my DLL fuel gauge Panels.Protocol(0x10,string.format("Fuel: %f %f",engine.fuel_internal,engine.fuel_external)) -- puts the values into a protocol file Where 'Panels' is the interface to my connected DLL showing the external gauges. @AlphaOneSix I think your suggestion will be my solution. It doesn't matter anything where to get the data from. It is only frustrating , that offered interface functions do not work, even over many version upgrades. Thanks to all in any case Mike [sIGPIC][/sIGPIC]
towsim Posted September 1, 2012 Author Posted September 1, 2012 LoGetEngineInfo @AlphaOneSix Hi, works like a charm... Thanks Mike [sIGPIC][/sIGPIC]
Recommended Posts