Jump to content
The simFlight Network Forums

John Dowson

Members
  • Posts

    11,472
  • Joined

  • Last visited

  • Days Won

    226

Posts posted by John Dowson

  1. There seems to be an issue with the speed of lua scripts when FSUIPC7 is auto-started by MSFS. Can you try manually starting FSUIPC7 - just exit it and restart manually, then try recording again to see if you get a faster rate.

    If I run this lua when FSUIPC7 is auto-started, I also see data logged at approx. 800ms intervals, as you do:

    Quote

    msecs,timeL,timeZ,lat,lon,alt(ft),pitch,bank,hdgT,hdgM,vs,ias,tas,gs,mach
    47,10:08:00,0808Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    938,10:08:01,0808Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    1735,10:08:02,0808Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    2531,10:08:02,0808Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    3297,10:08:03,0808Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    4094,10:08:04,0808Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    4891,10:08:05,0808Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    5688,10:08:06,0808Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    6485,10:08:06,0808Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    7266,10:08:07,0808Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002

    If I exit FSUIPC7, and restart it manually, I see data logged at roughly 63ms intervals:

    Quote

    msecs,timeL,timeZ,lat,lon,alt(ft),pitch,bank,hdgT,hdgM,vs,ias,tas,gs,mach
    0,10:09:04,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    63,10:09:04,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    125,10:09:04,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    188,10:09:04,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    250,10:09:04,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    313,10:09:04,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    375,10:09:04,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    438,10:09:05,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    500,10:09:05,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    563,10:09:05,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    625,10:09:05,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    688,10:09:05,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    750,10:09:05,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    813,10:09:05,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    875,10:09:05,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    938,10:09:05,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    1000,10:09:05,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    1063,10:09:05,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    1125,10:09:05,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    1188,10:09:05,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    1250,10:09:05,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002
    1313,10:09:05,0809Z,42.2421,-8.6240,834.1,-1.00,0.13,191.4,                                                                                        193.0,0,0,0,0,0.002

     You can also speed things up further by reducing the delay in the sleep statement on line 58:
        ipc.sleep(48)

    Note that this was reported previously in the following topic, but I have only just realized that this is related to how FSUIPC7 is started: 

     

    John

  2. @naizo I have looked at this again and it seems that lua scripts run a lot slower when FSUIPC7 is auto-started by MSFS. if it is started manually, it runs a lot faster.
    Are you auto-starting FSUIPC7 via the EXE.xml (i.e. using the auto-start component)? If so, can you try manually starting FSUIPC7 - just exit it when it starts and then restart it manually., Do you see a performance improvement?

    I noticed this when running the example record to csv.lua script. If I run this when FSUIPC7 is auto-started, the data is logged at roughly 800ms intervals, but if I exit and start FSUIPC7 manually, the rate goes up to around 63ms intervals, more than 10 times faster.

    I will update the documentation with this information, and report this to Asobo to see what, if anything,  can be done.

    John

  3. 7 hours ago, raptor84 said:

    I 'm copying the functions that I only want to use. So its not me causing the error. It appears the error is already there to begin without me knowing.

    https://www.avsim.com/forums/topic/538165-qw787-dreamliner-v11-9-mar-2020/

    I don't have or use LINDA.

    LINDA is quite a complex system - you cannot just extract one lua file an expect it to work asit may have many dependencies. If you want to do this, then you need to have some knowledge of lua to be able to modify the files so they work stand-alone.

    7 hours ago, raptor84 said:

    So for example, if I'm copying the QW_OH_LT_Both_RWYTF_toggle function (those 2 or 3 lines) as outlined from auctions.lua file, I assume its going to work

    You cannot assume that. You need to extract all dependencies, and then all functions that those depend on, etc etc.

    7 hours ago, raptor84 said:

    it appears something is missing because whom ever created that function must've left something out for that function to work, wouldn't you agree?

    No. That lua script will work withing the LINDA environment, where all dependencies will be available. The use of a string rather than a number is minor - that will still work (due to lua's lax type specification - the string will be converted to a number), but it is always a good idea to correct such mistakes as they can cause issues - especially if blindly copied.

    This error:
        1040344 *** LUA Error: C:\FSUIPC6\My789functions.lua:66: attempt to call global 'DspShow' (a nil value)
    is telling you that he function DspShow, called on line 66 of the My789functions.lua script, does not exist. Just remove that line (and also remove it if it appears elsewhere in your script) and then try again. When you try again, look at the log file to see if any errors, correct them, and repeat. However, I think if you remove those calls to DspShow, the script should work.

    If you want to use lua, you should really at least learn the basics of the lua language, If you don't want to do this, then you should use LINDA.

    7 hours ago, raptor84 said:

    I'm not trying to rant here but if I didn't need to come to this forum and seek help, I wouldn't have done so, even if the errors were obvious. In fact, I try searching the forum to help me solve the issue I'm having before posting my issue because I'm not trying to waste anyone's time here. I don't know what I'm looking for or even know what the error means. I don't think there is a manual to help translate the error, is there?? I'm not someone who knows code or software programming.

    But if you want to use lua, you need to at least understand the basics, And the log files are there for a reason - to help you. If you get any issues, at least try looking at the logs. If there are basic errors, e.g. syntax errors or missing dependencies/functions, then this should be pretty obvious, as in this example.

    I don't mind helping people with these sorts of issues, but I prefer to help people understand what the issue is and to help them diagnose and fix these type of issues for themselves. This then reduces the support I have to provide and gives me more time to develop and improve FSUIPC. I have a huge backlog at the moment but have hardly any time to work on improving my products as nearly all my time is spent on support.

    John

  4. @DaveSCUSA Have you managed to set this up yet (and I can consider this closed) or are you still having issues? If so, please let me know and I can provide further details on how to configure assignments for the C510.

    I will soon be looking into updating the Input Event functionality to store the current values of the Input Events, and this will make incrementing/decrementing these far easier. But until then, work-arounds are necessary for this.

    John

  5. I have now released this version as a beta release, available here: 

    Please download and use that version, which has a few minor updates compared to the version posted above, which I will now remove.

    For any issues with key presses or hot keys, please post here. For any other issues, especially with auto-tune, please use that announcement page.

    John

    • Like 1
  6. If you look at your log files, the error is obvious:

    Quote

      1040344 *** LUA Error: C:\FSUIPC6\My789functions.lua:66: attempt to call global 'DspShow' (a nil value)

    This is happening after the left light has been set (i.e. turned on or off) and will stop the processing, so the function to control the right light will not be called.
    The error is because you are using the function DspShow which is not defined anywhere.

    Note also that your lua scripts are writing numeric lvars as strings, e.g.
                ipc.writeLvar(lvar, '0')
    This should be
                ipc.writeLvar(lvar, 0)
    This happens in various places.

    Can you please try looking at the log files yourself and at least attempt to diagnose the issue before asking for support. I don't mind helping, but such obcious errors should be detected by the user really and not require support. Always at least look at your own log files before posting and the error may be obvious.

    John

  7. 15 hours ago, Ian Dale said:

    Might this also be the explanation as to why require(“LUACOM”) works in FSX but not in P3D?

    No. This is quite an old post. The lua COM library is working in all versions of FSUIPC. The 'LUACOM' library that you are using is different - it is a library to support the windows COM object library, not to read data from COM ports/sockets, which is what this thread is about.

    As I said in the other thread, I have no idea why/how WideClient can load this library but not FSUIPC. As I said (in the other thread), I will take another look at this when time permits.

    John

  8. 7 hours ago, Song said:

    I did Register and it works well. 

    Ok.

    7 hours ago, Song said:

    But, i have a big problem. 

    But this topic is about 'No ASSIGNMENT button shown FSUIPC7', which you have now solved (by registering).
    You cannot use the same topic for all your issues, If you have another issue, please create another topic.

    I am closing/locking this topic now as it is solved.

    John

  9. 8 hours ago, dragunov2020 said:

    iam new to msfs2020 and FSUIPC 7 and i noticed that there is no mouse macro in FSUIPC 7 like FSUIPC 6 in P3D 

    is there any plans for FSUIPC 7 to have mouse macro ?

    No, it is not possible to have mouse macros with MSF2020, and there are no plans to add this as the functionality is not provided by the MSFS SDK. There are alternative methods that replace the need for mouse macros - hvars (HTML variables), Input Events (also known as B vars) and calculator code (usually executed via presets).

    8 hours ago, dragunov2020 said:

    because if its not it will be a big problem for me

    It really shouldn't be an issue. For example, check the presets availalble for each aircraft here: https://hubhop.mobiflight.com/presets/. All MobiFlight presets are available for assignment in FSUIPC7.

    John

  10. 8 hours ago, ark1320 said:

    Above worked for me, tried it 3 or 4 times.

    Ok, thanks for checking.

    8 hours ago, ark1320 said:

    Question: If at some point auto-tuning doesn't work and values are set manually for the startup parameters, the next time FSUJIPC7 starts will those manually set parameter values be over written by the auto-tuning, or does the auto-tuning code check the FSUIPC7.ini file for those parameters?

    I will provide full details later today, but auto-tuning will only kick in if the default value of the DetectToConnectDelayAuto ini parameter hasn't been changed, or if it is forced. To test the auto-tuning, just remove the DetectToConnectDelayAuto parameter from your ini. If auto-tuning increases the DetectToConnectDelayAuto parameter, it will not run again. If it decreases this parameter, it will run again on the next auto-start unless the parameter has been decreased to 30 (minimum value for this parameter).

    I also noticed a minor issue in the above attachment - this has been corrected and the attachment replaced (no change in version number though). So please download this again if you want to try the auto-tuning.

    John

    • Like 1
  11. 15 hours ago, raptor84 said:

    I also have the event log checked within the FSUIPC but no log file was created.

    Events are logged to the FSUIPC6.log file. You also activated Log Lua Separately. Please do not set this - I prefer to see the lua log embedded in the FSUIPC6.log file. Only activate the logging I request please, no other logging needed. And no-need to rename your lua files with a txt extension. Also never start a new log file when generating logs for support, and always exit FSUIPC/P3D before attaching logs.

    I will look at your files tomorrow - just finishing for the day...

    John

  12. Sorry to have to revisit this, but I need to make further changes to the way FSUIPC7 starts, and I would like users who have this issue with key presses not being received to try this before I release publicly. Therefore could all people with this issue, especially @Cuantreau please test this version. Please attach logs if you have issues.

    This version contains an auto-tune feature for the connection issues, but I will publish details on this once I have verified that this version doesn't re-introduce the problem with keys/hot keys reported by so many of you.

    Thanks,

    John

    Attachment removed, now available from here: 

     

     

  13. 7 hours ago, JakedarlingYT said:

    i am having the same issue

    What issue is that? If it is the same as reported. follow the advise I have already posted.

    Otherwise please explain your issue and attach the relevant files - the InstallFSUIPC7.log file if having issues with installation, otherwise your FSUIPC7.log file. If unsure, attach both.

    As a new user to these forums you will have a restricted upload limit - zip/compress the files if too large.

    John

  14. 13 hours ago, raptor84 said:

    I'm a bit confuse with this one. Are you saying that in the AUTO section, it should look like this:

    [AUTO.A320]
    1=Lua My320functions

    [AUTO.B789]
    1=Lua My789functions

    With your current [Auto] section, both lua scripts will be ran for every aircraft that you use. If you replace this with the above, only the relevant script will be ran in each profile.

    13 hours ago, raptor84 said:

    So, I need to include the above functions as well in order to use the QW_OH_LT_Both_RWYTF_toggle function??? I thought the above function was to be use individually, that's why I left it out because I wasn't trying to turn them on individually, which is the case that is happening. Meaning, when I went back and included the missing functions and assigned Ctrl+F2 to the function you saw in my lua file, what ended up happening, it turned on/off the only Left Runway Turnoff light instead of turning on/off Both Runway Turnoff light as how I want it. The function name is copied correctly from the action file, so I don't know why the QW_OH_LT_Both_RWYTF_toggle function isn't working as its intended to do?

    I can't help if you don't show me/attach your updated script.
    You can also try logging (for Lua Plugins and maybe also Events) and work out what the script is doing and why it isn't working as intended.

    John

  15. 6 minutes ago, fennelda said:

    I spoke too soon - all three ghost controllers are now showing up again, without any change on my part! And my [JoyNames] section is corrupted again.

    Ok, so probably related to the timing, i.e. what Steam/MSFS is doing when FSUIPC is scanning the registry.

    I will report this to both Steam and MSFS and see what they say...

    Thanks for the files. Cheers,

    John

  16. 36 minutes ago, jonas_llubi said:

    I have the plug-and-play version of the A320-Radio from OpenCockpits and i am using the "IOCModules" software to use it with MSFS2020. I have the problem that when i change the frequency there for example to 122.805, the frequency on the A320 is 122.800. For a reason the last "5" digit is ignored. I contacted OpenCockpits regarding this and they think, that this is a communication error with FSUIPC. 

    What offset are you using for the COM frequency? For COM1, there are two offsets (for the active frequency):
       0x034E:  COM1 frequency, 4 digits in BCD format. A frequency of 123.45 is represented by 0x2345. The leading 1 is assumed.
       0x05C4: Active COM1 frequency in Hz (32 bit int)

    For 8.33KHz frequencies, you need to use offset 0x05C4, not 0x034E (as that does not support 8.33KHz spacing). Check which offset you are using. You can also use FSUIPC's offset logging facilities to check what these offsets hold.
    You can also check offset 0x0B47 which will tell you which frequency spacing mode is being used (25KHz or 8.33KHz).

    There are similar offsets for COM2 and standby - see the Offset Status document for details

    5 minutes ago, jonas_llubi said:

    I think it is related to: 

    Yes, the same issue - but that user was already using offset 0x05C4.

    What A320 model are you using?  Check what frequency spacing mode is supported. In the Asobo A320, I see this:
         5469 Monitor IPC:034E (U16) = 0x1870
         5469 Monitor IPC:05C4 (U32) = 118705000
         5469 Monitor IPC:0B47 (U8) = 1

    and in the FBW A320 (Development branch) this:
         185610 Monitor IPC:034E (U16) = 0x1870
         185625 Monitor IPC:05C4 (U32) = 118705000

    And when I change to 122.805, this:
       450344 Monitor IPC:034E (U16) = 0x2280
       450344 Monitor IPC:05C4 (U32) = 122805000

    So FSUIPC is holding the correct values for these aircraft.

    Please check those offsets for your aircraft model. If they are holding the correct values, then you need to go back to OpenCockpits. If they are not holding the correct values, then maybe the aircraft isn't setting the COM ACTIVE FREQUENCY simvar correctly. You can either report this to the aircraft developer, or check to see if they use an lvar to hold the correct 8.33KHz spacing - if so, you can add this lvar to an offset and use that.

    Cheers,

    John

       

     

  17. 52 minutes ago, fennelda said:

    As well as your suggestions, I also right-clicked on MSFS in the games list, clicked Properties, Controller and then selected "Disable Steam Input". I really felt this was going to work, however I still have the ghost controllers - but I now only have two, not three!

    Mine is set to Use default settings and I don't have this issue. I have experienced this issue before, but I can't remember what I did, if anything, to stop this.

    54 minutes ago, fennelda said:

    I believe the problem is that in the latest versions of Steam client, Steam Controller support can not be disabled completely. Indeed, in the Controller menu mentioned above, it states that Steam Controller and Remote Play are "Enabled, always required", and from a brief search online it seems impossible to change this setting.

    I also think this is caused by Steam - I will raise a support request with them.

    55 minutes ago, fennelda said:

    Interestingly, the positions of the "virtual" controllers in the FSUIPC7.JoyScan.csv file seem to determine whether these controllers cause an issue or not. I still now have two phantom controllers in my list, however since they are the top two entries in the list, they do not mess up my FSUIPC7.ini [JoyNames] section.

    Ok, that's good as at least your controllers are recognised and acquired correctly. Could you attach a joyscan.csv file for this please. It would also be useful to see a joyscan.csv file from when you start FSUIPC7 without MSFS running, when these phantom entries do not appear. I can then use this to show the difference to Steam support.

    Thanks,

    John

  18. 2 hours ago, raptor84 said:

    For example, when I assign the key Ctrl+F2 to toggle on/off the Runway turnoff lights and press it, nothing happens.

    Ctrl+F2 is assigned to LuaToggle My789functions with flag 2.  Flag 2 calls the QW_OH_LT_Both_RWYTF_toggle function:
       event.flag(2,"QW_OH_LT_Both_RWYTF_toggle")
    This is the function called:
     

    function QW_OH_LT_Both_RWYTF_toggle ()
        QW_OH_LT_L_RWYTF_toggle ()
        QW_OH_LT_R_RWYTF_toggle ()
    end

    The functions QW_OH_LT_L_RWYTF_toggle and QW_OH_LT_R_RWYTF_toggle do not exist (and neither QW_OH_LT_L_RWYTF_on, QW_OH_LT_R_RWYTF_on, QW_OH_LT_L_RWYTF_off, QW_OH_LT_R_RWYTF_off and QW_OH_LT_R_RWYTF_offQW_OH_LT_R_RWYTF_off).

    So looks like your lua is missing some functions, although I don't know why this error isn't logged.

    Note that you arer starting two lua dunctions in your [Auto] section, one for each profile. Better to use profile Auto sections (e.g. [Auto.B789]) to only start the luas needed for that profile.

    Also, consider using substrings for your aircraft profile names. i.e. change
     

    Quote

    [Profile.B789]
    1=QualityWings 787-9 United Airlines -SATCOM

    to

    Quote

    [Profile.B789]
    1=QualityWings 787-9

    which will then match the aircraft when using a different livery.

    John

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.