Jump to content
The simFlight Network Forums

Dominik

Members
  • Posts

    25
  • Joined

  • Last visited

Posts posted by Dominik

  1. 5 hours ago, John Dowson said:

    How do you want to read this data, and what do you want to do with it?

    It uses LUA to read the offsets and write this data as text to a txt file. The second program reads this data from the txt file and sends it to the Arduino. My point is to use LUA to read the text lines on the CDU and save them as text in a txt file. Then the second program will read this data from the txt file and send it to the Arduino.

  2. 44 minutes ago, John Dowson said:

    Ok, this will also be the issue for @bangaroo. If the lvars are available on a reload, then this indicates that the scan for lvars is being performed to early. To fix this, set or increase the value of the FSUIPC_WASM.ini parameter LvarScanDelay. It is recommended to do this in an  FSUIPC_WASM.ini file in your WASM permanent storage area, not the one under your Community\fsuipc-lvar-module folder, as that will be overwritten when you update/re-install. See the Advanced User guide for further details.

    John

    Thanks for your help, I set LvarScanDelay = 25 in FSUIPC_WASM.ini and actually fsuipc loaded more LVARs for me. Previously it was loading around 1700 now it's 1912. Everything works ok. I found the file FSUIPC_WAMS.ini in Community \ fsuipc-lvar-module only. There is no such file in the location mentioned in the Advanced User guide. Should I copy the teen ini file from the community folder?

  3. 3 minutes ago, John Dowson said:

    You can use the lua com library to read the state of buttons of a HID joystick type device - see the FSUIPC Lua Library documentation, function:
        com.gethidbuttons(handle, str)

     

    Thank you for your help!

  4. 37 minutes ago, John Dowson said:

    You have to determine if there is a simvar (a simulator A type variable, most held in FSUIPC offsets), or an lvar that holds the current which position. Its most probably the latter - try listing lvars to see if there is anything appropriate.  If there is, you can read that in lua.

    John

    I have a homemade panel. I want lua to read if a given switch is on or off. I don't mean the switch settings in MSFS, but the switches on my panel that I can set in fsuipc.

  5. With LUA I can write an event e.g.

    event.button (2,4,1, "EFIS320") and it works ok.

    But how do you check with LUA what position this button is in? Whether it is on or off, what is the position 0,1 or 2

     

    Regards

    Dominik.

  6. Hello, I'm trying to read the offset 0x034E - COM1 frequency, using lua, Here is the code

    while 1 do
    file = io.open("test.txt", "w")
    
    ppp = ipc.readUW(0x034E)
    
    file:write(ppp, "\n")
    
    file:close()
    
    ipc.sleep(50)
    end

    The loop writes the value of this offset to the file. The value of this offset is 6194, com1 frequency is set to 118.050 

    It reads this value wrong and I don't know where I went wrong. Please help.

    Dominik.

     

  7. Autopilot offsets are working properly. You can write and read the values 1 and 2. Unfortunately the autopilot itself does not work properly, it seems to me that these offsets are responsible for the "dots" on the autopilot display and something else. If the plane climbs to the set altitude and we lower the autopilot altitude and write AUTOPILOT ALTITUDE SLOT INDEX value 2, the plane will not start descending. But if you press the cockpit switch that write the value 2 for AUTOPILOT ALTITUDE SLOT INDEX, the plane begins to descend. The button in the cockpit has to execute some other event.

    0x029D 1 Byte APU SWITCH - works value 0,1

    4 hours ago, John Dowson said:

    Do you know if there a control/event I can use for this? If so, I can make 0x029D also writable.

    I have no idea, now I'm trying to start the autopilot via VB

    Dominik.

  8. 3 hours ago, John Dowson said:

    Can you try the attached version, v7.0.4b, where I have added the following offsets:
        0x0290 4Bytes AUTOPILOT ALTITUDE SLOT INDEX
         0x0294 4Bytes AUTOPILOT HEADING SLOT INDEX

        0x0298 1 Byte APU SWITCH

    0290 - works well, result 1 or 2

    0294 - works but you need   / 65536   to get a result 1 or 2

    0298 - works after pressing the button APU Start - result 1, APU off - result 0

    It would be great if you could write these offsets, not only read. How would you find the SPEED_SLOT_INDEX_SET offset, it would be great x2

    Dominik.

  9. Hello, using Visual Basic 6 I can write events into MFS2020, e.g.

    this is what fsuipc does

       442906 *** EVENT: Cntrl= 68066 (0x000109e2), Param= 1 (0x00000001) SPEED_SLOT_INDEX_SET

    and that's what Visual Basic does

    Dim fff As Long
    fff = 1
    Call FSUIPC_Write(&H3114, 4, VarPtr(fff), dwResult)
    Call FSUIPC_Write(&H3110, 4, VarPtr(68066), dwResult)

    no offset (unless i'm wrong)  SPEED_SLOT_INDEX_SET, is there any way to read the parameter of this event (SPEED_SLOT_INDEX_SET) using VB6?

    I want to know what mode is set to speed, managed or selected.

  10. Hello,

    I use FSX PMDG 737, I have a program that reads offsets from PMDG. Everything works well during FREE FLIGHT. When connecting to a multiplayer session, offsets are not read. Some are "frozen" eg the time is read once and the second one does not change. Is there a problem with FSUIPC during a multiplayer session?

    Regards,
    Dominik

     

    ********* FSUIPC4, Version 4.974 (24th February 2018) by Pete Dowson *********
    Windows 7 Ultimate 64 Bit with SP 1.0 reported as Build 7601 (OS 6.1)
    fsx.exe version = 10.0.61472.0
    Reading options from "C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.ini"
    Running inside FSX on Windows 7
    Module base=646A0000
    User Name=
    User Addr=
    FSUIPC4 Key is provided
    WIDEFS7 not user registered, or expired
            0 System time = 08/07/2018 13:44:28
            0 FLT path = "C:\Users\KuczeKiler\Documents\Flight Simulator X Files\"
            0 ------ Module Version Check ------
            0        acontain.dll: 10.0.61472.0
            0             api.dll: 10.0.61472.0
            0        controls.dll: 10.0.61472.0
            0      fs-traffic.dll: 10.0.61472.0
            0             G3D.dll: 10.0.61472.0
            0        language.dll: 10.0.61472.0
            0            sim1.dll: 10.0.61472.0
            0        visualfx.dll: 10.0.61472.0
            0         weather.dll: 10.0.61472.0
            0          window.dll: 10.0.61472.0
            0 ----------------------------------
           16 Trying to connect to SimConnect Acc/SP2 Oct07 ...
           63 FS path = "C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\"
          172 ---------------------- Joystick Device Scan -----------------------
          187 Product=
          203    Vendor=043F, Product=0202 (Version 1.3)
          203    GUIDs returned for product: VID_043F&PID_0202:
          203       GUID= {2F2A9C30-6BE3-11E8-8001-444553540000}
          203       Details: Btns=112, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R511,U511,V511,X511,Y511,Z511
          203 Product= T-Rudder
          203    Manufacturer= Thrustmaster
          203    Vendor=044F, Product=B679 (Version 1.16)
          203    GUIDs returned for product: VID_044F&PID_B679:
          203       GUID= {B1B090D0-503B-11E6-8001-444553540000}
          203       Details: Btns=0, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R0,U0,V0,X1023,Y1023,Z1023
          219 Product= CH FLIGHT SIM YOKE USB
          219    Manufacturer= CH PRODUCTS
          219    Vendor=068E, Product=00FF (Version 0.0)
          219    GUIDs returned for product: VID_068E&PID_00FF:
          219       GUID= {B4F3A3F0-60A3-11E5-8001-444553540000}
          219       Details: Btns=12, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R255,U255,V0,X255,Y216,Z255
          219 Product=
          219    Vendor=3100, Product=0002 (Version 1.3)
          219    GUIDs returned for product: VID_3100&PID_0002:
          219       GUID= {96F100D0-EB4F-11E7-8001-444553540000}
          219       Details: Btns=112, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R511,U511,V511,X511,Y511,Z511
          219 Product=
          219    Vendor=7FEC, Product=2567 (Version 1.3)
          219    GUIDs returned for product: VID_7FEC&PID_2567:
          219       GUID= {5CC32DA0-66BC-11E8-8001-444553540000}
          219       Details: Btns=112, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R435,U402,V495,X0,Y0,Z495
          219 -------------------------------------------------------------------
          234 Device acquired for use:
          234    Joystick ID = 4 (Registry okay)
          234    4=MJOY NOWY
          234    4.GUID={2F2A9C30-6BE3-11E8-8001-444553540000}
          234 Device acquired for use:
          234    Joystick ID = 2 (Registry okay)
          234    2=T-Rudder
          234    2.GUID={B1B090D0-503B-11E6-8001-444553540000}
          234 Device acquired for use:
          234    Joystick ID = 0 (Registry okay)
          234    0=CH FLIGHT SIM YOKE USB
          234    0.GUID={B4F3A3F0-60A3-11E5-8001-444553540000}
          234 Device acquired for use:
          234    Joystick ID = 1 (Registry okay)
          234    1=MJOY2
          234    1.GUID={96F100D0-EB4F-11E7-8001-444553540000}
          234 Device acquired for use:
          234    Joystick ID = 3 (Registry okay)
          234    3=MJOY1
          234    3.GUID={5CC32DA0-66BC-11E8-8001-444553540000}
          234 -------------------------------------------------------------------
          499 LogOptions=00000000 00000001
          499 -------------------------------------------------------------------
          499 ------ Setting the hooks and direct calls into the simulator ------
          499 --- CONTROLS timer memory location obtained ok
          499 --- SIM1 Frictions access gained
          499 --- FS Controls Table located ok
          499 --- Installed Mouse Macro hooks ok.
          499 --- Wind smoothing fix is fully installed
          499 --- G3D.DLL fix attempt installed ok
          499 --- SimConnect intercept for texts and menus option is off
          499 --- All links checked okay
          499 -------------------------------------------------------------------
          499 SimConnect_Open succeeded: waiting to check version okay
          499 Trying to use SimConnect Acc/SP2 Oct07
          499 Opened separate AI Traffic client okay
         1872 Running in "Microsoft Flight Simulator X", Version: 10.0.61472.0 (SimConnect: 10.0.61259.0)
         1872 Initialising SimConnect data requests now
         1872 FSUIPC Menu entry added
         1872 C:\Users\KuczeKiler\Documents\Flight Simulator X Files\1.FLT
         1872 C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\SimObjects\Airplanes\B737_800\Boeing737-800.AIR
        49094 Weather Mode now = Real World
        68329 C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\SimObjects\Airplanes\PMDG 737-800NGX WL\B737-800WL.AIR
        76253 User Aircraft ID 1114113 supplied, now being used
        76253 Aircraft loaded: running normally now ...
        76519 System time = 08/07/2018 13:45:45, Simulator time = 08:05:14 (12:05Z)
        76784 Aircraft="PMDG 737-800NGX LOT Polish Airlines (SP-LWA)"

     

  11. Hello,
    Thank you for your reply and help. The script works almost well, the data changes at a good speed, the sleep function works, FPS do not fall, but after releasing the button, the data changes. The loop works all the time.
    I changed the code to:

     

    while 1 do
        ipc.control (70481,2147483647)
        ipc.sleep (400)
    end
     

    and in fsuipc I set the LuaKill to work after releasing the button.
    Now it works very well.
    Why does the loop still work on your code when you release the button?

    Regards,

    Dominik.

     

  12. 7 hours ago, Pete Dowson said:

    Incidentally, I don't see the point of the ipc.sleep(400).

     

    I use push buttons to switch radio frequency and autopilot settings (altitude, HDG IAS, etc.) Without sleep function, this data changes too quickly and it is difficult to hit the right value. Slowing down in LUA with the Sleep function it worked great.

    8 hours ago, Thomas Richter said:

     Did you check if the FSX load on the processor extreme increases that might prove that? Pete might correct me here if I'm wrong.

    Yes, I checked the processor load, the CPU load did not increase.

     

    I understand that FSUIPC is working properly and that LUA script FPS will be smaller due to looping
     

    Regards.

    Dominik

  13. Hello,

    in fsuipc I have assigned LUA script buttons. The buttons have the "Control to repeat while held" option selected. When using these buttons, the FPS drops from 30 to ~ 7 !!! which is very tedious. This happened after installing the latest version of FSUIPC 4.974. On version 4.858 LUA worked correctly. I use FSX and B737 PMDG

     

    I am asking for help because it is impossible to fly :(

    Sample LUA file:
    ipc.control (70481,2147483647)
    ipc.sleep (400)

    Regards,

    Dominik

×
×
  • 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.