Jump to content
The simFlight Network Forums

Kaffeebart

Members
  • Posts

    10
  • Joined

  • Last visited

Posts posted by Kaffeebart

  1. HIDscanner didn't found any of the CDUs

    But using com.read in Lua Script seems to work. Thank you for your help.


    For all with the same Problem:
    - I added 3 Areas in the FSUIPC.ini
     

    [VRINSIGHT]
    1=COM4
    2=COM5
    
    [VRInsight.CDU2]
    Lua=CDUpilot
    DriverReads=YES
    DriverWrites=NO
    
    [VRInsight.CDU2]
    Lua=CDUfo
    DriverReads=YES
    DriverWrites=NO

    - For the Lua script itself i used parts of HDIdemo and VRI_SetMach
    The Main Function actually writes only a log of what i received by the com port.

    if VRImodel == nil then
       -- Set known ports if testing with Lua not loaded automatically
       VRIdevice = "COM4"
    end
    
    speed = 115200 -- is this the same for all VRI devices?
    handshake = 0  -- No handshake
    minsize = 8
    maxsize = 8    -- VRI seems to use fixed length blocks of 8 bytes
    
    -- Polling rate in number of polls per second
    -- Must higher than 0
    Pollrate = 20
    
    dev = com.open(VRIdevice, speed, handshake)
    if dev == 0 then
       ipc.log("Could not open VRIdevice port")
       ipc.exit()
    end
    
    -- Hauptfunktion
    function Poll(time)
    	str, n = com.read(dev,8)
    	ipc.log(str)				-- Here i receive Data from Com Port for example "LSKL1" or "FUN11" or "KEYA"
    end
    
    if Pollrate == 0 then
       -- Ouch. Mustn't divide by zero!
       Pollrate = 20 
    end
    event.timer(1000/Pollrate, "Poll")  -- poll values 'Pollrate' times per second

     

  2. Hi there

    I followed instruction in advanced user guide appendix 3 and added a VRINSIGHT Section to FSUIPC.ini

    [VRINSIGHT]
    1=COM4
    2=COM5

    But now both Devices will be detected with the same joystick number.
    What do i have to do that i can use both of them seperately. I want one for the Pilots input and the other one for the FO input so i must differentiate both CDUs

    Thank you

     

    PS: Using FSX and FSUIPC 4 latest Version

  3. Hi there

    On simmarket i saw the statement " Note: If both WideFS7 and FSUIPC4 or FSUIPC5 are registered, both registrations must use the same user name. "

    As my mailadress has changed since i bought FSUIPC i'm not sure if i can order a key for WideFS that will work.
    So must name AND mail be the same for both progs?  If yes how can i get a registration key with my old inactive mailadress?

    kind regards
    Stefan

  4. Hi there

     

    how can i steer the PWM Outputs of Pokeys57E using LUA script?

     

    i tried this

     

     

    chk_pin_121_42, pin_121_42 = poKey121:GetAnalogInput(41)

      if(pin_121_42 <= 15) then        --Input 42 Poti (Analog In) max value 4080 min value 15

      pin_121_42 = 0

      end  

    poKey121:SetPWMOutputs(0,4080,pin_121_42)

    --Output liegt auf Pin 22 bzw. Channel 0

     

    but on line 5 Flight Simulator will crash down :(

     

    Thanks for helping

     

    Stefan

  5. Hi there

    i try to set a toggle switch for taxi lights.

    I know how to check an complete offset for changes - it´s like that

    event.offset("0D0C", "UW", "TaxiLights")

    But how can check just the bit which is important for the TaxiLights? (In this case the bit i need to know is :cool:

    I think i can read out the value of a bit so that i can decide if a LED has to turn on or off for the next step.

    Hope you´ll understand my english

    Thanks for your response.

    Stefan

    EDIT:

    Sorry for the question i think i found a workaround.

    If you´re interested in it i will post it.

    function TaxiLights(offset, value) -- TaxiLights prüfen und LED schalten

    gfd.SetBright(GFT8, 0, 12)

    TL = logic.And(ipc.readUW(0x0D0C), 8) -- Wert prüfen ob TaxiLight ein oder aus sind

    if TL == 1 then

    gfd.SetLight(GFT8, 0, 1)

    else

    gfd.ClearLight(GFT8, 0, 1)

    end

    end

    function SetTaxiLights(model, unit) -- Taxi Lights ein/ausschalten

    gfd.GetValues(model, unit)

    if gfd.TestButton(1) then -- prüfen ob Hebel für Taxi lights Wert true hat

    ipc.clearbitsUW(0X0D0C,8)

    else

    ipc.setbitsUW(0X0D0C,8)

    end

    end

    event.offset("0D0C", "UW", "TaxiLights") -- Abfrage ob Aktion bei Lichtern

    event.gfd(GFT8, 0, "SetTaxiLights") -- Abfrage ob Aktion bei Switches

  6. Hello i don´t know whats wrong with my cofiguration.

    I want to set one Switch of the GF-T8 modul for starting or shutdown the APU.

    If i use the T8 switch nothing happens.

    In the logfile i can see this if i use the switch of the T8 modul

    579419 Button changed: bRef=0, Joy=109, Btn=2, Pressed

    579419 [buttons] 5=P109,2,C66705,0

    579419 FS Control Sent: Ctrl=66705, Param=0

    580059 Button changed: bRef=0, Joy=109, Btn=2, Released

    580059 [buttons] 6=U109,2,C66704,0

    580059 FS Control Sent: Ctrl=66704, Param=0

    and this if i use the APU switch in FSX by clicking with the mouse

    582524 *** EVENT: Cntrl= 66704 (0x00010490), Param= 0 (0x00000000) APU_STARTER

    583444 *** EVENT: Cntrl= 66705 (0x00010491), Param= 0 (0x00000000) APU_OFF_SWITCH

    What can i do to get the switch work with the Goflight modul?

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