Jacques Balayla Posted June 9 Report Posted June 9 Hi, I've recently purchased a stream controller (Soomfon) and it's working beautifully with the Fenix L:Var/Lua file in FSUIPC - I assign a keyboard key and it binds to that function - then use the box to call on that key combo and absolutely everything works perfectly (overhead panel buttons, FCU, Lights, etc) but the APU start button does not seem to work after following normal procedures - APU Master SW - APU start - APU bleed. The master switch works and so does the bleed - but not the APU start - any ideas why? My Lua file is the following: -- Toggle APU Start Button local val = ipc.readLvar("S_OH_ELEC_APU_START") if val == 0 then ipc.writeLvar("S_OH_ELEC_APU_START", 1) else ipc.writeLvar("S_OH_ELEC_APU_START", 0) end
John Dowson Posted June 9 Report Posted June 9 Does the lvar change values? Ifthe script is sunning as expected and the lvar is changing values, then you need something more than just to set that lvar. Why not try the presets instead: APU Start Button Push and APU Start Button Release Use logging to see if the script is running and the lvar is being updated: set logging for Lua Plugins and WAPI debug level logging.
Jacques Balayla Posted June 9 Author Report Posted June 9 Will try and report back. Do you have the APU Start Button Push and APU Start Button Release l:var functions for the fenix?
John Dowson Posted June 9 Report Posted June 9 16 minutes ago, Jacques Balayla said: Do you have the APU Start Button Push and APU Start Button Release l:var functions for the fenix? They are MF presets, and there is also FNX320_APU_START_SWITCH. You can assign to presets directly (check the select fir Preset checkbox), or in lua you can use ipc.execPreset function. I don't have the fenix to check these. John
John Dowson Posted June 9 Report Posted June 9 Btw, the calc code for FNX320_APU_START_SWITCH is: (L:S_OH_ELEC_APU_START) 2 + (>L:S_OH_ELEC_APU_START) i.e. it is incrementing the lvar by 2, not 1. So maybe try: - Toggle APU Start Button local val = ipc.readLvar("S_OH_ELEC_APU_START") if val == 0 then ipc.writeLvar("S_OH_ELEC_APU_START", 2) else ipc.writeLvar("S_OH_ELEC_APU_START", 0) end The calc code for the press/release presets looks rather strange to me, as it seems to be sending two values to the lvar, which I didn't think possible: push: 1 (L:S_OH_ELEC_APU_START) ++ (>L:S_OH_ELEC_APU_START) release: 0 (L:S_OH_ELEC_APU_START) ++ (>L:S_OH_ELEC_APU_START) If the presets are not working, you can ask about this on the MF support discord server (MSFS2020 channel). John
Jacques Balayla Posted June 10 Author Report Posted June 10 Hi John, Tried your code - im afraid it doesn't work. So odd that it's just the APU start - even with the right variables. Im really at a loss here...
John Dowson Posted Wednesday at 08:05 AM Report Posted Wednesday at 08:05 AM 15 hours ago, Jacques Balayla said: Tried your code - im afraid it doesn't work. Did you try the presets? As I said, if they are not working, you can ask about this on the MobiFligh support on Discord. 15 hours ago, Jacques Balayla said: So odd that it's just the APU start - even with the right variables. Im really at a loss here... How does that variable change when you start it manually? Do you also see any events or input events when starting it manually? It could be that something else is needed. You can also try inspecting the switch behavior to see how it works - see https://www.badcasserole.com/uncovering-input-events-using-the-msfs2020-model-behavior-dialog/
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