John Dowson
Members-
Posts
13,780 -
Joined
-
Last visited
-
Days Won
288
Content Type
Profiles
Forums
Events
Gallery
Downloads
Everything posted by John Dowson
-
Reading ProSim A320 variables with FSUIPC lua script
John Dowson replied to stefangr's topic in FSUIPC7 MSFS
First, to update the scoped lvar, you need to create a preset in the myevents.txt file (create this if you don't yet have one): //ProSim/A320 ProSim737_MIP_AUTOBRAKE_MAX#$Param (>L:1:I_MIP_AUTOBRAKE_MAX_L) then assign to that with an appropriate parameter value. To add this to an offset (for reading only - writing/updating won't work), create a lua script to copy the value of the scoped lvar to a standard lvar, and add the standard lvar to an offset. The lua script to keep the lvar in sync with the scoped lvar is as follows: -- function to copy the value of the scoped lvar to the standard lvar function updateLvar(time) ipc.execCalcCode("(L:1:I_MIP_AUTOBRAKE_MAX_L) (>L:I_MIP_AUTOBRAKE_MAX_L") end -- Create an lvar to hold the value of the scoped lvar -- Note that if you want to do this for multiple scoped lvars, better to create the lvars using calculator code, e.g. -- ipc.execCalcCode("(L:1:I_MIP_AUTOBRAKE_MAX_L) (>L:I_MIP_AUTOBRAKE_MAX_L") -- for each lvar, and then call -- ipc.reloadWASM() -- This is because using ipc.createLvar will also force a reload, and you don't want to do this after creating -- each lvar - best just to do it once after all the lvars have been created. -- But as we are only currently doing this for one scoped lvar, we will use the ipc.createLvar function. ipc.createLvar("I_MIP_AUTOBRAKE_MAX_L") -- wait until the new lvar has been received ipc.sleep(250) -- Start a timer function to keep the lvar in sync with the scoped lvar event.timer(150, "updateLvar") The script should be auto-started in your profile [Auto.xxx] section (where xxx is the profile name).You can then add the lvar to an offset in the usual way, e.g. John -
FSUIPC6 will not connect.
John Dowson replied to Robert Armstrong's topic in FSUIPC Support Pete Dowson Modules
Then that will be the issue. As far as I am aware, ADE has not been updated to be compatible with v6. As I said, you need to ask about this on any ADE forums, but as far as I am aware, this product is no longer supported. You could possibly trick ADE into thinking that you are running Prepar3D v4 or v5, but I do not know the consequences of doing this. I allow this in FSUIPC7 for fooling some add-ons that MSFS2020 is running rather than MSFS2024, but I don't think this is possible in the current version of FSUIPC6. I could allow this and provide you with a test version if you would like to try this, but I have no idea if ADE would still work as expected. I suggest you first look at the ADE forums on using this with P3Dv6. If you can't find much useful, I can provide an updated version of FSUIPC6 that will allow the P3D version to be updated, and so maybe fooling ADE - but, beware of the possible consequences of doing this! John -
Why not just include the FSUIPC_User64.h and link to the FSUIPCuser64.lib? Yes - can you not use the provided lib? I did update this to a later version of VS/VC, but only added this in FSUIPC7. I have attached this updated lib and header. I am a bit busy at the moment and cannot look into this in detail at the moment. When I have more time, I will look into which VS versions should be used, and update to VS2022 if needed. John FSUIPCuser64.lib FSUIPC_User64.h
-
For the next release of FSUIPC7, I have added: INTERACTIVE POINT GOAL at offset 0x341B INTERACTIVE POINT OPEN at offset 0x3424 both are 1 byte, with each bit indicating the index number (e.g. 0x341B bit 4 is INTERACTIVE POINT GOAL:4). This won't help your problem at the moment, but if you could log these offsets, as well as offset 0x3367 (EXIT OPEN), all as U8 in hex, this may shed a light on what is being used. It is possible to spoof the reading of the existing door offset (0x3367 for EXIT OPEN) to these new offsets, but most probably the bits referenced will be for different doors. I don't have the FSL A321neo, or GSX/SLC, so cannot test with these. I looked at the FSL A321, but that just seems to use the EXIT OPEN offset. Anyway, maybe try the attached and add the offset logging for those 3 offsets (all as U8 in hex), and we can see what this tells us. John FSUIPC7.exe
-
Reading ProSim A320 variables with FSUIPC lua script
John Dowson replied to stefangr's topic in FSUIPC7 MSFS
@stefangr Is this clear for you? I can provide a sample lua script for the I_MIP_AUTOBRAKE_MAX_L variable, if it is a scoped lvar, if you need this. Let me know. John -
FSUIPC6 will not connect.
John Dowson replied to Robert Armstrong's topic in FSUIPC Support Pete Dowson Modules
What version of P3D are you using? That message indicates that the version of ADE you are running is not compatible with the version of P3D you are using. I believe that ADE was updated for P3Dv5, but am not sure if it has been updated for P3Dv6. But I cannot help with this - this is an issue with ADE, not FSUIPC. Ask on the ADE support forums. John -
Reading ProSim A320 variables with FSUIPC lua script
John Dowson replied to stefangr's topic in FSUIPC7 MSFS
But what type of variables are they? Are they scoped lvars? Then they are probably scoped lvars. MobiFlight will read these by executing a calculator code script and getting the value in the response. In FSUIPC, I do not provide/allow for a response from executing calculator code. Again, this depends on the variable type. If they are scoped lvars, you can only get the value, and add this to an offset, by writing/copying the value of the scoped lvar to a standard lvar, and then read or add this to an offset. You would need to update the value of the lvar (from the scoped lvar) at regular intervals (e.g. at 6Hz) as well, so that the lvar holds the current value of the scoped lvar. You can do this using a lua script. -
Reading ProSim A320 variables with FSUIPC lua script
John Dowson replied to stefangr's topic in FSUIPC7 MSFS
It all depends on what variable types they are. They won't be simvars, or A-type variables, as these are only defined by MSFS/Asobo. They could be lvars, hvars or input events (also known as b-vars). First, with the aircraft loaded, try listing the available lvars (Add-ons->WASM->List Lvars). Do you see them listed? You can also try listing the available Input Events (Log->List Input Events) - do you see them there? Note that MSFS2024 also has a new type of lvar (local variable), called 'scoped lvars'. There is currently no way to discover such vriables, but you can update them using calculator code. To read them, you would need to use calculator code to write the value to a standard lvar, and then read that. See If it is a scoped lvar, it may also be available as an Input Event, so please make sure you check there. -
By default, lua scripts are only loaded/recognised when placed in the FSUIPC7 installation folder. If you are using a subfolder, you need to add LuaPath=Scripts to your [LuaFiles] section. Do NOT manually edit or change the [LuaFiles] section (apart from the LuaPath entry) unless you know what you are doing. The list if lua files is maintained by FSUIPC. The ipc.display function is no longer reliable in MSFS, as it depends on the Simconnect_Text function which is no longer available. You need to use the Wnd library for display. The documentation for this function does say: This was working for basic display in earlier versions of MSFS. but has basically been unavailable for quite a while. I will update the documentation to make this clear. John
-
What works - the one I attached? Please try building this yourself, if you have not already, and check that that works. That would be the first step. Maybe, I am not sure, but as its just a c lib I would have thought it would be a fine in a console app...first make sure you can build and run the UIPCHello example. If that works, maybe convert your example to a win32 app to see if that works.
-
There are two ways to send mu;tiple controls on a button or key press: 1. Use macros. 2. Overload the controls. e.g. make the first assignment, then comment this out in your ini, then reload the assignments and make the second assignment. Repeat until you have all the assignments, then uncomment the ones you commented out and reload the assignments again. These are documented in the User guide, page 27: John
-
If these controls don't work when assigned externally, this should be reported and fixed by Cowansim. There are a couple of input events, that way work, but I am not sure they are the same (I am not that familiar with helicopter controls): If those are the same as the cyclic lat/long controls, you could maybe try those, but I suspect they are different and you will have to assign in MSFS until this is fixed by Cowansim. Best to tag a user for a direct question, e.g. @Nevarc ? John
-
FSUIPC4 Key will not work
John Dowson replied to Gator87's topic in FSUIPC Support Pete Dowson Modules
All 3 parts if the key (Name. Address/Email & Key) must exactly match the details shown in your purchase email or SimMarket account. Try cutting and pasting all three parts of the key from your purchase email. If it still doesn't validate, you probably need to update your VC++ redistributables. Download and install the latest combined VC++ redistributable packages (both x86 and x64) from https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist If you still have issues after updating those, let me know your purchase order number (do NOT post key details!) and I will check them here. John -
All three parts of the key (Name, Address/email & key) must EXACTLY match the details in your purchase email (or SimMarket account), othrwise your key will not be valid. This is why we recommend to copy and paste these details from your purchase email. I also gave you a key file with the correct details that you were not putting in the correct place. I really don't understand why you had such difficulties with this.... John
-
Are you sure that the FSUIPC7.key file exists in that installation folder? If so, are the contents correct (i.e. your name and address))? Me neither... Why not? Are you using anything else other than Windows Defender? Maybe try installing on a different drive, to see if that makes a difference.
-
But the key file is still not in your installation folder: If it was in your installation folder, the User Name and User Addr would be populated from that file. If it is there, and it has the correct name (please check!), then something else must be blocking FSUIPC from reading this file. Does your S drive have any special permissions associated to it? There also seems to be an issue with your internet connection: Either that or your anti-virus is blocking FSUIPC7. Did you check your anti-virus?
-
Your log shows: i.e. there is no FSUIPC7.key file in your FSUIPC installation folder. As I said, you need to place the FSUIPC7.key file in your FSUIPC7 installation folder, ie. copy it to S:\MSFS2020\ But if that is your actual MSFS2020 folder, then you should install FSUIPC7 in a different location. It should be in its own folder, not installed into any MSFS folder.
-
Has APLv2 been updated to recognise MSFS2024? If not, you could try writing 13 to offset 0x3308 (best done using the ipcInit.lua script) to fool APL into thinking that MSFS2020 is running and not MSFS2024. Otherwise I do not know why APLv2 is not connecting properly - you should ask about this on the APL forums, You can post FSUIPC7.log files here and I can check for any errors when its not connecting, but if FSUIPC7 is connected and functioning normally. it will be an issue with APL. John
-
What says 'demo'? Why are you being so cryptic? There is no such thing as a 'demo' in FSUIPC....it is either licensed or unlicensed. Did you re-install the combined VC++ redistributables, both x64 and x86, as I asked? If you saved that key file to your FSUIPC7 installation folder, then please show me / attach your FSUIPC7.log file.
-
Can't seem to get the sound library to work
John Dowson replied to DaveSCUSA's topic in FSUIPC7 MSFS
Probably. '\' is the lua escape character, so any lua strings that want to use this character as it is must use '\\' (or '\b'). So all lua functions that take a string argument that contains a path will need this escaped. There are many such functions. What documentation? I am not going to state this in every lua function that accepts a file path. Consult the lua documentation or google for details on lua, e.g. https://how.dev/answers/what-are-escape-characters-in-lua John -
Looks like I added GetInputEventValue twice instead of adding getInputEventValue. I will correct this in the next release. John