
John Dowson
Members-
Posts
13,331 -
Joined
-
Last visited
-
Days Won
273
Content Type
Profiles
Forums
Events
Gallery
Downloads
Everything posted by John Dowson
-
I have moved your post to Paul's .Net client sub-forum, but if an lvar doesn't exist it may be due to the lvar scan performed by the WASM was done before the lvar was created/available. If this is the case, you can adjust the WASM ini parameter LvarScanDelay, or call the reload function to get the WASM to rescan for lvars.
-
Using Lvars in fsuipc7.ini and or lua scripts
John Dowson replied to Detlef_747's topic in FSUIPC7 MSFS
The WASM reload isn't necessary - and can cause FSUIPC to crash - I will look into this). The WASM forces a new lvar scan when a new lvar is created, and there looks to be a timing or thread issue somewhere - and can also crash without the reload. Changing the lua to the following: ipc.createLvar("ipcpmdg_MAIN_NoseWheelSteeringSwNORM", 5400) ipc.sleep(1000) ipc.createLvar("ipcpmdg_MAIN_annunSPEEDBRAKE_ARMED", 2300) ipc.sleep(1000) ipc.log("Startng loop...") local v while true do v = ipc.readUB(0x65ea) print("nose wheel steering Switch "..v) ipc.writeLvar("ipcpmdg_MAIN_NoseWheelSteeringSwNORM", v) v = ipc.readUB(0x65fd) print("annunc speedbrake armed "..v) ipc.writeLvar("ipcpmdg_MAIN_annunSPEEDBRAKE_ARMED", v) ipc.sleep(1000) end seems to be stable, produces the attached log. Note that new config data (lvar and hvar names) is received when a new lvar is created. The rest of the log just shows the nose wheel steering Switch being toggled a few time, logged by FSUIPC monitoring as well as the lua script logging. I will investigate the FSUIPC crash. On your side, you should set Debug level logging in the WAPI, forget about the lua script for the time being, monitor offset 65EA and see if that changes when you toggle the nose wheel steering switch (after removing the guard). I would like to confirm or otherwise if you are receiving the PMDG client data regularly - we need to sort that out first. John FSUIPC7.log -
Using Lvars in fsuipc7.ini and or lua scripts
John Dowson replied to Detlef_747's topic in FSUIPC7 MSFS
There does look to be a timing issue when calling reloadWASM directly after creating the lvars - I will look into this. Changing the script to produces the output in the attached log when toggling the nose wheel steering switch...i.e. as expected... John FSUIPC7.log -
Using Lvars in fsuipc7.ini and or lua scripts
John Dowson replied to Detlef_747's topic in FSUIPC7 MSFS
This is correct - it only logs the first reception of data, and not subsequent ones. To log every reception (and a lot more), you can use the Log->Custom option and enter x4000 - this will log everything received via SimConnect. Can you please try logging offset 0x65EA using FSUIPC's offset monitoring facilities, then remove the nose wheel switch guard and toggle the nose wheel steering switch a few times and see if the offset changes. Not sure what is happening with your lua...there are only these statements in your log: Did you not set logging for Lua plugins? If not, please do that, and log to the standard log file (i.e. do not Log Lua Separately). But lets first see if you are getting the PMDG offset data correctly first before we sort out why the lua isn't working correctly. Better (but not strictly necessary) also to use ipc.log rather than print in your lua scripts. John -
Please update to the latest version. v7.3.8. Presets are now in a separate menu, available on a new checkbox, and not preceded by 'Prefix:' anymore, so you can see the complete preset name (except for a few maybe). John
-
This is not necessary - just disconnect and re-connect from the MSFS menu (in FSUIPC7). But, in the latest releases, the WAPI is enabled by default, so you only need to enable if explicitly disabled. John
-
Yes, that was the problem I had - did you not review the comments on this thread? You need to read the thread before asking on an issue that has already been discussed on the same thread.... John
-
Using Lvars in fsuipc7.ini and or lua scripts
John Dowson replied to Detlef_747's topic in FSUIPC7 MSFS
It could be that those offsets are not populated. I am going to put together a list of working/not working offsets so that these can be reported to PMDG once the SDK has been released. You could check the following offsets which are the most recent ones i have checked as working; Otherwise, you can add the following to the [General] section of your FSUIPC7.ini which will log the reception of PMDG client data: TestOptions=x400 John -
Please see the description of how FSUIPC's tiller/rudder blending works in the box on page 30 of the FSUIPC7 User guide. Also see the ini parameters MaxSteerSpeed in the Advanced User guide (P9). Maybe try with MaxSteerSpeed=Q20,30,0,60 With that,, you would have 0% rudder up to 20 knots, linear increasing to 10% from 20-30 knots, then linear increasing to to 100% from 30-60knots. Adjust as needed. John,
-
You don't need the lua script if using the presets.
-
FSUIPC not creating his folder on the Community Folder
John Dowson replied to josemgtz777's topic in FSUIPC7 MSFS
Then the location in your UserCfg.opt file is incorrect: I do not know why this is incorrect...very strange... Do you have a Steam or MS store installation? If using Steam (which the installer detects due to the presence of the UserCfg.opt file under $APPDATA$\Roaming\Microsoft Flight Simulator), you could try correcting this by changing the InstalledPackagesPath location (it is at the end of the file) to the correct one, and then re-install FSUIPC7. If you are using an MS Store installation, you need to uninstall FSUIPC7, delete or rename the file C:\Users\josem\AppData\Roaming\Microsoft Flight Simulator\UserCfg.opt and then install FSUIPC7 again. John -
Using Lvars in fsuipc7.ini and or lua scripts
John Dowson replied to Detlef_747's topic in FSUIPC7 MSFS
But the problem looks to be that the offset value isn't changing, no? Presuming that is the correct offset (I have only spot-checked some and calculated the rest from an SDK file) and if so then the data isn't being provided correctly. As the SDK for the PMDG 737 for MSFS has still not been published, there is not much that can be done at the moment. I will take a look at this to verify (tomorrow now) and will start to maintain a list of of valid/invalid offsets for the PMDG 737 - should have done this at release! John -
FSUIPC and possible Tobii background processes?
John Dowson replied to LH067U's topic in FSUIPC7 MSFS
Strange...you should get an application crash event (maybe preceded and followed by other events) when you get a CTD. But Tobi and MCE would be your best bet for support on this, as you said. -
Using Lvars in fsuipc7.ini and or lua scripts
John Dowson replied to Detlef_747's topic in FSUIPC7 MSFS
Try with: ipc.createLvar("ipcpmdg_ELEC_annunAPU_GEN_OFF_BUS", 1234) ipc.createLvar("ipcpmdg_APU_EGTNeedle", 4321) ipc.reloadWASM() ipc.sleep(1000) ... i.e. you need to reload thee lvars from the WASM a before they become available. Note also that if a reload results in more lvars being found than previously (which of course there will be as you have created some), then this will/should trigger the reload of the [LvarOffsets] section from the ini. John -
PMDG B737-700: LEDs for A/P P/RST, A/T P/RST, FMC P/RST not working
John Dowson replied to hermann's topic in FSUIPC7 MSFS
That is as (newly) documented : I guess the next byte 65FA is for the copilot button. The other offsets must be correct then, just not populated correctly by PMDG. Cheers, John -
FSUIPC and possible Tobii background processes?
John Dowson replied to LH067U's topic in FSUIPC7 MSFS
Check for crash and failure events with Windows Event Viewer - may help. -
FSUIPC and possible Tobii background processes?
John Dowson replied to LH067U's topic in FSUIPC7 MSFS
FSUIPC has nothing to do with Tobi and knows nothing about it, as do I! -
Using Lvars in fsuipc7.ini and or lua scripts
John Dowson replied to Detlef_747's topic in FSUIPC7 MSFS
Ok. But if you don't create the lvars, they won't exist and they will be ignored. But I need to see your pmdg737.lua script - you forgot to attach that... John -
The license has now been updated. John
-
PMDG B737-700: LEDs for A/P P/RST, A/T P/RST, FMC P/RST not working
John Dowson replied to hermann's topic in FSUIPC7 MSFS
Yes, that's what I (eventually) understood, but thanks for clarifying. Sounds like it is an issue for PMDG, but as the SDK has still not yet been officially published, there is not that much that can be done at the moment. I will take a look though, but, as I said, I'm not that familiar with the 737 at the moment and I'm not sure how to get these to light up - they flash or either remain off. I need to get more familiar with the aircraft's systems and cockpit layout anyway... Cheers, John -
PMDG B737-700: LEDs for A/P P/RST, A/T P/RST, FMC P/RST not working
John Dowson replied to hermann's topic in FSUIPC7 MSFS
You mean that they don't hold the expected data values... Not sure about that one - do you mean that that also does not hold the correct value? Which switch is that? Is there a mapping of (lvar) switch number to function anywhere? You can control the switches using the Rotor Brake controls. But I guess you know that and are trying to determine the state of these switches, no? I'll check to see if I can see any lvars that hold the state. John -
No...please read the lua library documentation - and also the template I showed you. It would be more like this: myEventFunction(controlnum, param) -- Check parameter of Rotor Brake control to see if if param == 7715 then ipc.control(1071,77) -- send 'M' key (77) press elseif param == 7717 then ipc.control(1072,77) -- send 'M' key (77) release end end -- Wait for control to be received event.control(66587, "myEventFunction") If you want to send separate press and release, you need to use the separate FSUIPC added controls to send the key press (1071) and then the key release (1072) - ipc.keypress would send them both together. Note also that you need to have the lua running - it should be started from the [Auto] or, better, [Auto.xxx] (where xxx is the profile name) section of your FSUIPC7.ini. Again, consult the documentation if not sure (Advanced User guide). John Later: Btw, I used 77 (the 'M' key) as that is what you were using, You change this value to any other key or key+modifier - see the Advanced User guide for the keycode and shifts/modifier codes/numbers.
-
Nothing complex - something along the following lines - where <controlnum> is the control/event received when you press the button in the VC, and <keycode> is the key press you want to send: myEventFunction(controlnum, param) -- send keypress here - may need to check the control' parameter first if a Rotor Brake control ipc.keypress(<keycode>) end -- Wait for control to be received event.control(<controlnum>, myEventFunction) But as I keep saying, you can only do this if some sort of control/event is sent when press the button in the VC.
-
Using Lvars in fsuipc7.ini and or lua scripts
John Dowson replied to Detlef_747's topic in FSUIPC7 MSFS
I am slightly confused by your post. The PMDG offsets are not lvars, it is additional read-only data provided by PMDG. What happens> Show me the lua scrip, and activate logging for lua plugins and see if you get any errors. Note that if creating youy own lvars, it may take a short time before that lvar is available for reading/writing. That enables the broadcasting of the data to enable the FSUIPC PMDG offsets (read-only) to be populated. Do those lvars exist, or are you creating them? You cannot add lvars that you create using the [LvarOffsets] section as this is only processed when the initial lvars are received from the WASM. If they exist when you list them but are not available for adding to offsets, this implies that they had not been created when the WASM scanned for existing lvars. This happens with complex aircraft as it can take up to a minute or so to create all the necessary lvars. You should update the LvarScanDelay FSUIPC_WASM.ini parameter - this defaults to 5 (seconds) but is recommend to start with a value of 45 or so (see the Advanced User guide for details). Any further issues, please show me your FSUIPC7.ini as well as the FSUIPC7.log file, and any lua scripts if the problem is there. John -
Ok, so your problem is that FSUIPC is not running, i.e. not auto-starting. For auto-start issues, please see John