Works perfectly. Thanks again.
function interceptStabTrim(offset, value)
if value == 16000 then
-- do nothing
else
ipc.writeSW(0x0BC0, value)
end
end
event.intercept(0x0BC0, "SW", "interceptStabTrim")
It's not a single problem I was trying to solve.
I work on multiple simulator setups, each with an array of external applications (over which i have no control) mostly using fsuipc.
One example of what I can now fix, is a hardware interface constantly setting elevator trim in the game to match the physical trim wheel position - blissfully unaware of another application trying to control the games trim for autopilot. I can trick the hardware into thinking it is trimmed to a certain point eg 16,000. I know that an autopilot won't trim to that extent and can therefore distinguish between the conflicting writes to 0BC0 and ignore the hardware value, but allow the autopilot writes to occur.