icebird4all Posted September 30, 2021 Report Posted September 30, 2021 Hello Simmers! First question - i am very new to lua and fsuipc - i like it and try to get on. But i can't manage it, to read the 10 different light states out of the bit offset of 0x0D0C - maybe anyone can show me an example - how i can do it right. Meanwhile i also use the lvar to read the state - but i would like to also know the way with bit from offset. Second question - if i want display text - in tips msfs2020 window - its ok - but i will stay on screen the whole time - even if i use ipc.display("") or ipc.linedisplay("") - it stay there - and if i click on the tips window - i had to click as often, as i send a new line to the display - so it seems - with every text i send - a new window will be displayed - and cannot be closed. If i try to use wnd instead - i have the next problem - that after some show - hide - the wnd window is gone and not showing up anymore - till the restart of msfs2020. Every help appreciated - thx! Best regards...
John Dowson Posted September 30, 2021 Report Posted September 30, 2021 10 hours ago, icebird4all said: Second question - if i want display text - in tips msfs2020 window - its ok - but i will stay on screen the whole time - even if i use ipc.display("") or ipc.linedisplay("") - it stay there - and if i click on the tips window - i had to click as often, as i send a new line to the display - so it seems - with every text i send - a new window will be displayed - and cannot be closed. Simconnect text facilities are completely broken in the current release of MSFS and shouldn't be used. 10 hours ago, icebird4all said: If i try to use wnd instead - i have the next problem - that after some show - hide - the wnd window is gone and not showing up anymore - till the restart of msfs2020. Can you please show me your lua script + FSUIPC7.ini and I can take a look. 10 hours ago, icebird4all said: to read the 10 different light states out of the bit offset of 0x0D0C - maybe anyone can show me an example To read the offset, use ipc.readUW(0x0D0C). You then need to use the lua logic library to extract the value of the bit you need, so something like: lights = ipc.readUW(0x0D0C) navLightsState = logic.And(lights, 0x0001) beaconLightsState = logic.And(lights, 0x0002) landingLightsState = logic.And(lights, 0x0004) ... cabinLightsState = logic.And(lights, 0x0200) John
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now