Closed Ben-LucaKoerber closed 10 months ago
I found a source in the fsuipc forum where a simple lua script starts eventdriven:
function logvs(off, val) if val ~= 0 then -- if on ground flag just set, get VS, convert it and log it vs = ipc.readSD(0x030C) vs = vs 60 3.28084 / 256 ipc.log("Vertical speed at touchdown = " .. vs) end end
-- set to call above routine whenever "on ground" flag changes event.offset(0x0366, "UW", "logvs")
As far as I am aware, there is no functionality for event listeners outside of Lua scripts. See also this comment on the FSUIPC forum. The only way to respond to changes is by keeping track of the old value and checking if thas changed when you call process()
. The ValueChanged
property mentioned on the forum is specific to the C# library and does not exist within FSUIPC itself.
If you want to use event listeners and do not need to support older simulators, SimConnect does support notifications on changes.
Hey Koesi10 :) I wanted to use the fsuipc-node in a custom tracking project which final goal is to build a flight tracking software for a virtual airline. Polling data in given intervalls works great, but the functionality is a little limited if there are no event listeners (Fsuipc SDK calls it event.offset) for offsets available. Is there any way to implement this in your module?
Thanks for your answer in advance. Merry christmas.