Jump to content
The simFlight Network Forums

kdlovell

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by kdlovell

  1. Hi Peter,

     

    Thanks for the response.  I should have mentioned that the reason I am trying to accomplish this is so that a virtual airline acars system can read the taxi light from FSUIPC when the Aerosoft Airbus is used.

     

    I created a simpler example and turned on the logging as you suggested:

     

    Sim:             FSX Steam Edition

    FSUIPC:     4.949

    Aircraft:       Default 737-800

     

    Steps:

    1) Load Aircraft and turn on all lights except taxi light

    2) Run Lua script

     

    Result: Taxi light turns on and all other lights turn off

     

    Expected Result: Taxi light turns on and all others remain as is

     

    Lua Script:

     

    ipc.sleep(100)
    ipc.display("Turning on Taxi Light...")
    ipc.sleep(2000)
     
    ipc.setbitsUW(0x0D0C, 8) 
     
    ipc.display("Done")
    ipc.sleep(2000)
     
    Lua Debug Log:
     
    ********* LUA: "test" Log [from FSUIPC version 4.949] *********
       156203 System time = 13/01/2016 08:16:01, Simulator time = 11:14:15 (16:14Z)
       156203 LUA: beginning "D:\Program Files (x86)\Steam\steamapps\common\FSX\Modules\test.lua"
       160421 LUA: ended "D:\Program Files (x86)\Steam\steamapps\common\FSX\Modules\test.lua"
       160421 System time = 13/01/2016 08:16:06, Simulator time = 11:14:19 (16:14Z)
    ********* LUA execution terminated: Log Closed *********
     
    FSUIPC Log:
     
    ********* FSUIPC4, Version 4.949 by Pete Dowson *********
    fsx.exe version = 10.0.62615.0
    Reading options from "D:\Program Files (x86)\Steam\steamapps\common\FSX\Modules\FSUIPC4.ini"
    Running inside FSX Steam Edition on Windows 8.0
    Module base=55FF0000
    User Name="Keith Lovell"
    User Addr="keithlovell@metrocast.net"
    FSUIPC4 Key is provided
    WideFS7 Key is provided
           62 System time = 13/01/2016 08:13:25
           62 FLT UNC path = "C:\Users\Keith\Documents\Flight Simulator X Files\"
           62 ------ Module Version Check ------
           62        acontain.dll: 10.0.62615.0
           62             api.dll: 10.0.62615.0
           62        controls.dll: 10.0.62615.0
           62      fs-traffic.dll: 10.0.62615.0
           62             G3D.dll: 10.0.62615.0
           62            sim1.dll: 10.0.62615.0
           62        visualfx.dll: 10.0.62615.0
           62         weather.dll: 10.0.62615.0
           62          window.dll: 10.0.62615.0
           62 ----------------------------------
           93 Trying to connect to SimConnect Steam ...
           93 FS UNC path = "D:\Program Files (x86)\Steam\steamapps\common\FSX\"
          390 ---------------------- Joystick Device Scan -----------------------
          390 -------------------------------------------------------------------
          406 LogOptions=00000000 00000001
          406 -------------------------------------------------------------------
          406 ------ Setting the hooks and direct calls into the simulator ------
          406 --- CONTROLS timer memory location obtained ok
          406 --- SIM1 Frictions access gained
          406 --- FS Controls Table located ok
          406 --- Installed Mouse Macro hooks ok.
          406 --- Wind smoothing fix is fully installed
          406 --- All links checked okay
          406 -------------------------------------------------------------------
          406 SimConnect_Open succeeded: waiting to check version okay
          406 Trying to use SimConnect Steam
         4015 Running in "Microsoft Flight Simulator X", Version: 10.0.62615.0 (SimConnect: 10.0.62615.0)
         4015 Initialising SimConnect data requests now
         4015 FSUIPC Menu entry added
         4031 D:\Program Files (x86)\Steam\steamapps\common\FSX\flights\other\FLTSIM.FLT
         4031 D:\Program Files (x86)\Steam\steamapps\common\FSX\SimObjects\Airplanes\Aircreation_582SL\Aircreation_582SL.air
         7453 Weather Mode now = Theme
        21765 D:\Program Files (x86)\Steam\steamapps\common\FSX\SimObjects\Airplanes\B737_800\Boeing737-800.air
        59000 Aircraft="Boeing 737-800 Paint1"
        59000 System time = 13/01/2016 08:14:24, Simulator time = 11:13:32 (16:13Z)
        66078 Starting everything now ...
        82781 Advanced Weather Interface Enabled
       129703 LogOptions changed, now 80000000 00000001
       129718 Monitor IPC:0D0C (U16) = 2
       144109 Monitor IPC:0D0C (U16) = 6
       144109 SimRead: 0D0C="LIGHT LANDING"
                INT32: 1 (0x00000001)
       148093 Monitor IPC:0D0C (U16) = 262
       148093 SimRead: 0D0C="LIGHT LOGO"
                INT32: 1 (0x00000001)
       150093 Monitor IPC:0D0C (U16) = 278
       150093 SimRead: 0D0C="LIGHT STROBE"
                INT32: 1 (0x00000001)
       158375 Monitor IPC:0D0C (U16) = 8                     <================ This is where the Lua script was run
       164937 Sim stopped: average frame rate for last 35 secs = 92.3 fps
       168671 System time = 13/01/2016 08:16:14, Simulator time = 11:14:23 (16:14Z)
       168671 *** FSUIPC log file being closed
    Minimum frame rate was 75.8 fps, Maximum was 122.2 fps
    Minimum available memory recorded was 3015Mb
    Average frame rate for running time of 51 secs = 99.7 fps
    Memory managed: 27 Allocs, 27 Freed
    ********* FSUIPC Log file closed ***********
     
    Thank you again for your time.
     
    Keith
  2. Hello,

     

    I have been reading through the forums on how to toggle the lights in the 0D0C offset.  My goal is to use a lua event to appropriately set the taxi light based on the Aerosoft Airbus Lvar.  I understand each light is controlled by a separate bit and normally this would be done using AND and OR logic.  However, based on what I have been reading in the forums and the Lua Library doc, the setbitsUW and clearbitsUW should work in place of using the AND and OR logic.  Unfortunately, in all of my testing it seems to reset all of the other light offsets rather than just operate on the taxi light.  I have also tested a one line script using setbitsUW to toggle the taxi light in the default 737 with the same result. 

     

    Am I using the code below incorrectly?  Do I need the AND and OR logic when using the setbitsUW and clearbitsUW

     

    -- set the pollrate to 250ms = 4 times per second
    pollrate = 250
     
    function writeTaxi(varname, value)
       if value == 1 then
         ipc.setbitsUW(0x0D0C, 8) 
       else
         ipc.clearbitsUW(0x0D0C, 8) 
       end
    end
     
    -- create an event listener to monitor the LVAR
    -- this will call the function above when the LVAR changes
    -- Aerosoft Airbus Taxi Light
    event.Lvar("L:AB_TAXI_LT", pollrate, "writeTaxi")
     
    Thank You
     
     
     
×
×
  • 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.