Jump to content
The simFlight Network Forums

jonny

Members
  • Posts

    15
  • Joined

  • Last visited

Posts posted by jonny

  1. I got my new CH Throttle Quadrant a few days ago and have tested a lot.

    In FS9 all throttle levers work OK, reverse thrust at lever 1 and 2 to throttle 1 and 2, all OK.
    Levers 3 and 4 to prop pitch 1 and 2 with reverse as feather works OK.
    Levers 5 and 6 to mixture 1 and 2 with reverse to fuel cut of, all works OK,
    This tests are at a Twin Otter 2 eng turbo and FSUIPC 3.999z8.

    In FSX same tests as for FS9 and all works OK. This tests are at Twin Otter 2 eng turbo and default King Air 350 2 eng turbo. FSUIPC 4.948e.
     

     

    In P3D V2.4 tests failure.
    FSUIPC is 4.948e

    First configuration:
    levers 1 and 2 to throttle 1 and 2, reverse thrust DOES NOT work.
    Levers 3 and 4 to prop pitch 1 and 2 with reverse as feather works OK.
    Levers 5 and 6 to mixture 1 and 2 with reverse to fuel cut of, all works OK,

    Second configuration:
    levers 1 and 2 to prop pitch 1 and 2 with reverse as feather works OK.
    Levers 3 and 4 to throttle 1 and 2, reverse thrust works OK.
    Levers 5 and 6 to mixture 1 and 2 with reverse to fuel cut of, all works OK,
     

    FS9 CH Tthrottle Quadrant settings are:
    Lever 1 to joy 2 axis X
    Lever 2 to joy 2 axis Y
    Lever 3 to joy 2 axis Z
    Lever 4 to joy 2 axis R
    Lever 5 to joy 2 axis U
    Lever 6 to joy 2 axis V

    FSX and P3D CH Tthrottle Quadrant settings are:
    Lever 1 to joy 2 axis X
    Lever 2 to joy 2 axis Y
    Lever 3 to joy 2 axis Z
    Lever 4 to joy 2 axis R
    Lever 5 to joy 2 axis V   different from FS9
    Lever 6 to joy 2 axis U   different from FS9
     

    The problem is in P3D first configuration, reverse thrust doesn't work,
    In P3D second configuration I have change levers 1 and 2 to prop pitch and levers 3 and 4 to throttles. And now throttle reverse thust works OK. Prop pitch still OK with reverse as feather.

    From my point of view FSUIPC cant handle output from Joy 2 axis X and Y when they are assigned to throttle 1 and 2.

     

    Or what am I doing wrong?
     

  2. Hi,

     

    I am trying to get reverse throttle at my CH Throttle Quadrant for the default aircraft Beech King Air 350 but it fails all the time. I follow the: Configuring FSUIPC with CH USB Yoke ... ... .. by John Cook but it fails all the time. Reverse will not works otherwise the throttle works OK.

    What am I doing wrong??

    Is there any flightsimmer who has done this settings and with luck?
    If so will you present part of your FSUIPC4.ini file!

  3. I would like to rebuild the taxi part of Groundhandling5.
    Normaly you increase and decrease taxispeed with mouse pointer. But I would also like to do it from my second keybord using HIDMacro, FSUIPC+LUA and Taxispeed.xml in Groundhandling5.

    I have rebuild Taxispeed.xml by creating macro for the code in the mouse area.

    Part of original file:

    <Mouse>  <Area Left="3" Top="35" Right="16" Bottom="57">    <Cursor Type="DownArrow"/>    <Tooltip ID="">Decrement Target Taxispeed</Tooltip>    <Click Repeat="Yes">      (L:TsTargetSpeed,number) 4 >      if{ (L:TsTargetSpeed,number) -- (>L:TsTargetSpeed,number) }      els{ 1 (>L:GH_Sound07,bool) }    </Click>  </Area> 

    Which is rebuild to:

    <Mouse>  <Area Left="3" Top="35" Right="16" Bottom="57">    <Cursor Type="DownArrow"/>    <Tooltip ID="">Decrement Target Taxispeed</Tooltip>    <Click Repeat="Yes">    @DecTaxspeed              <<<<<<<<-------- changed       </Click>  </Area>

    and macros like this:

    <Macro Name="DecTaxspeed">      (L:TsTargetSpeed,number) 4 >      if{ (L:TsTargetSpeed,number) -- (>L:TsTargetSpeed,number) }      els{ 1 (>L:GH_Sound07,bool) }</Macro>

    Code for use from keyboard:

    <Element>  <Select>    <Value>      (L:DecTaxiSpeed) 1 == if{             0(>L:DecTaxiSpeed, number)              @DecTaxspeed               }    </Value>  </Select></Element>

    All of the previous codes are in the Taxispeed.xml. The code is almost the same for all three parts of my rebuild, Increase Taxispee, Decrease Taxispeed and Taxipeed On, Off and Armed. The new Taxispeed.xml works OK when using mousepointer.

     

    From the HIDMacro and the second keyboard I use this code:

    HIDMacros.SetFSUIPCInt &H66C1, 2, 1

    It is offset programming in FSUIPC.

    In FSX module folder I have ipcReady.lua, part of:

    function dectax(offset, val)  if val == 1 then    ipc.writeLvar("L:DecTaxiSpeed", 1)    ipc.writeSW(0x66C1,-1 )  endendipc.writeSW(0x66C1,-1)event.offset(0x66C1, "SW", "dectax")

    The previous code is almost the same for three part in Taxispeed.xml; Increase Taxispeed, Decrease Taxispeed and Taxispeed On, Off and Armed. But with proper variables for each one.

    This works, but not always. And that is my problem.
    When I press proper key the speed may increase on, two or tree steps and then don't move any more. I then have to press the proper key for decrease speed and the speed decrease on, two or three steps and then stops! I have to change the key the whole time. The mousepointer works OK all the time and have no effect at the keyboard keys. I would like the key to works like the mousepointer. When I press key for Increase I would like the taxispeed to increase as long I press the key. And the same for decrease!

    I think the lua code is wrong, but I can't find out what!
     

  4. Hi Pete!

    Excuse me for my previous answer.

    I change my script as your example.

    After some experiment I think it works OK now.

    First I think I hade some fault in med Notepad++ editor, causing the script to not works.

    When I rewrote the Lua script in Notepad the script works but only one time after each FSX start. It seems like the script stop working after one execution. Has it to do with -1 and 0 I used in the first script. Or does ipcReady.lua stop working when I land and the arcraft has stopped. Because when I start the fligth again the script doesn't work. It doesn't work after a restore of the fligt eigter.

    When I change -1 and 0 to 0 and 1 it seems working much better. Now when I start and stop a fligth or when I restore a flight the script is working all the time.

    Does this description sounds OK or have I run into garbage mixing?

    Jonny

  5. Hi,

    I have a L:MasterCaution variable as I will set to 0 at some time.

    I wrote this LUA.script and assign it to a key everything works perfekt.

     ipc.writeLvar("L:MasterCaution", 0)[/CODE]

    The script is this single line and nothing more.

    For HIDmacro I have wrote this LUA-script:

    [CODE]function sendmybutton()
    ipc.writeLvar("L:MasterCaution", 0)
    ipc.writeUW(0x66C0,-1)
    end

    ipc.writeUW(0x66C0,-1)
    event.offset(0x66C0, "UW", "sendmybutton")[/CODE]

    and named it to ipcReady.lua and it is placed i Modules folder.

    I did almost as you wrote in http://forum.simflig...pc/#entry419638

    and in HIDmacro the macro is:

    [CODE]HIDMacros.SetFSUIPCInt &H66C0, 2, 0[/CODE]

    When I press the key in HIDmacro the macro sends to FSUIPC and strange thing happens: the whole FSim freeze for a second or two and I can see an affect at the MasterCaution but it is not reset as in the script from the key. FSim starts working again and I have to press the key in the first scrip and Caution resets.

    What is wrong? Any help is appreciated.

    Jonny

  6. When I run WideFS and Plan-G on a second computer, FS9 on my first computer crash to desktop after 20 minutes. Why? I do not get any information from Dr Watson only a sign telling me that 'Microsoft Flight Simulator has run into a problem and has to stop'.

    I have done som tests:

    If I run WideFS alone on the second computer and Plan-G on the fs computer fs9 crash after 20 minutes.

    If I run WideFS alone on the second computer and no Plan-G, fs9 do not crash, after 20 minutes I start Plan-G on the second computer and after 20 minutes FS9 chras on my first computer.

    My computers have WinXp as OS.

    What is wrong? Where should I start looking for a failure?

    I ask this question at Peter Dowson and as well as at Tim Arnot.

    /Jonny

  7. Hi Pete!

    Thanks for all help.

    I have tested the first hint and it works very fine.

    Here is my code:

    -- LUA_mode_02.lua

    -- prog to handle the aircrafts radios from the keyboard

    -- setting heading bug, altitude bug etc.

    -- setting radiofrequencies

    -- aktivate autopiloten

    -- allt från tangentbordet, kräver omställning av vissa tangenter genom val på andra tangenter.

    -- t.ex. när man väljer HDG BUG skall öka-minska tangenterna ställa om headingen,

    -- när man väljer NAV radio1 skall öka-minska och dec-öka-minska sändas till just NAV1 radion.

    -- all ipc.display() function is for debugg purpuse during programming.

    select = 0 -- 0=NAV1 radio, 1=NAV2radio, 2=COM1radio, 3=COM2radio

    function swap_label(keycode, shifts) -- <-> label

    ipc.display("keycode="..keycode.."\nshifts="..shifts.."\nlabel = <-> label")

    if select == 0 then ipc.control(66448, 0) end --NAV1 RADIO SWAP

    if select == 1 then ipc.control(66452, 0) end --NAV2 RADIO SWAP

    if select == 2 then ipc.control(66372, 0) end -- COM1 RADIO SWAP

    if select == 3 then ipc.control(66444, 0) end -- COM2 RADIO SWAP

    end

    function com_sel(keycode, shifts) -- COM SEL label

    if ipc.readUB(0x66C0) > 2 then

    ipc.writeUB(0x66C0, 2)

    select = 2

    else

    ipc.writeUB(0x66C0, 3)

    select = 3

    end

    ipc.display("keycode="..keycode.."\nshifts="..shifts.."\nselect="..select.."\nlabel= COM SEL label")

    end

    function nav_sel(keycode, shifts) -- NAV SEL label

    if ipc.readUB(0x66C0) > 0 then

    ipc.writeUB(0x66C0, 0)

    select = 0

    else

    ipc.writeUB(0x66C0, 1)

    select = 1

    end

    ipc.display("keycode="..keycode.."\nshifts="..shifts.."\nselect="..select.."\nlabel= NAV SEL label")

    end

    -- Enable event on keys being pressed (only)

    event.key(78, 8, "swap_label") -- <-> label n-key

    -- these keys are assigned to start a LUA prog.

    -- event.key(77, 8, 1, "whole_inc") -- SEL + label m-key

    -- event.key(188, 8, 1, "whole_dec") -- SEL - label komma_key

    -- event.key(190, 8, 1, "fract_inc") -- ledig punkt_key

    -- event.key(189, 8, 1, "fract_dec") -- ledig minus_key

    event.key(72, 8, "com_sel") -- COM SEL label h_key

    event.key(74, 8, "nav_sel") -- NAV SEL label j_key

    -- ************************************************** --

    -- four LUA-prog

    -- LUA_whole_dec.lua

    select = ipc.readUB(0x66C0)

    if select == 0 then ipc.control(65640, 0) end --NAV1 RADIO WHOLE DEC

    if select == 1 then ipc.control(65644, 0) end --NAV2 RADIO WHOLE DEC

    if select == 2 then ipc.control(65636, 0) end -- COM1 RADIO WHOLE DECnnn

    if select == 3 then ipc.control(66436, 0) end -- COM2 RADIO WHOLE DEC

    ipc.sleep(200)

    -- LUA_whole_inc.lua

    select = ipc.readUB(0x66C0)

    if select == 0 then ipc.control(65641, 0) end --NAV1 RADIO WHOLE INC

    if select == 1 then ipc.control(65645, 0) end --NAV2 RADIO WHOLE INC

    if select == 2 then ipc.control(65637, 0) end -- COM1 RADIO WHOLE INC

    if select == 3 then ipc.control(66437, 0) end -- COM2 RADIO WHOLE INC

    ipc.sleep(200)

    -- LUA_fract_dec.lua

    select = ipc.readUB(0x66C0)

    if select == 0 then ipc.control(65642, 0) end --NAV1 RADIO FRACT_DEC

    if select == 1 then ipc.control(65646, 0) end --NAV2 RADIO FRACT_DEC

    if select == 2 then ipc.control(65638, 0) end -- COM1 RADIO FRACT_DEC

    if select == 3 then ipc.control(66438, 0) end -- COM2 RADIO FRACT_DEC

    ipc.sleep(200)

    -- LUA_fract_inc.lua

    select = ipc.readUB(0x66C0)

    if select == 0 then ipc.control(65643, 0) end --NAV1 RADIO FRACT_INC

    if select == 1 then ipc.control(65647, 0) end --NAV2 RADIO FRACT_INC

    if select == 2 then ipc.control(65639, 0) end -- COM1 RADIO FRACT_INC

    if select == 3 then ipc.control(66440, 0) end -- COM2 RADIO FRACT_INC

    ipc.sleep(200)

    -- END ******************************

    Which of your methods are to prefer?

    According to FS-framerates or computer performance?

    And now another question to this project:

    Do you know any way a XML-gauge kan read the FSUIPC-offset: 'select = ipc.readUB(0x66C0)'. I would like a small gauage to see which part is selected for the moment?

    Or iIs it possible to use some offset connected to a given XML-event or parameter? An offset which we can do without!!

    /Jonny

  8. This is my start of programming.

    -- prog to handle the aircrafts radios from the keyboard

    -- setting heading bug, altitude bug etc.

    -- setting radiofrequencies

    -- aktivate autopiloten

    -- allt från tangentbordet, kräver omställning av vissa tangenter genom val på andra tangenter.

    -- t.ex. när man väljer HDG BUG skall öka-minska tangenterna ställa om headingen,

    -- när man väljer NAV radio1 skall öka-minska och dec-öka-minska sändas till just NAV1 radion.

    -- all ipc.display() function is for debugg purpuse during programming.

    select = 0 -- 0=NAV1 radio 1=NAV2radio 2=COM1radio 3=COM2radio

    function swap_label(keycode, shifts) -- <-> label

    ipc.display("keycode="..keycode.."\nshifts="..shifts.."\nlabel = <-> label")

    if select == 0 then ipc.control(66448, 0) end --NAV1 RADIO SWAP

    if select == 1 then ipc.control(66452, 0) end --NAV2 RADIO SWAP

    if select == 2 then ipc.control(66372, 0) end -- COM1 RADIO SWAP

    if select == 3 then ipc.control(66444, 0) end -- COM2 RADIO SWAP

    end

    function whole_inc(keycode, shifts) -- SEL + label

    ipc.display("keycode="..keycode.."\nshifts="..shifts.."\nlabel = SEL + label")

    if select == 0 then ipc.control(65641, 0) end --NAV1 RADIO WHOLE INC

    if select == 1 then ipc.control(65645, 0) end --NAV2 RADIO WHOLE INC

    if select == 2 then ipc.control(65637, 0) end -- COM1 RADIO WHOLE INC

    if select == 3 then ipc.control(66437, 0) end -- COM2 RADIO WHOLE INC

    end

    function whole_dec(keycode, shifts) -- SEL - label

    ipc.display("keycode="..keycode.."\nshifts="..shifts.."\nlabel = SEL - label")

    if select == 0 then ipc.control(65640, 0) end --NAV1 RADIO WHOLE DEC

    if select == 1 then ipc.control(65644, 0) end --NAV2 RADIO WHOLE DEC

    if select == 2 then ipc.control(65636, 0) end -- COM1 RADIO WHOLE DEC

    if select == 3 then ipc.control(66436, 0) end -- COM2 RADIO WHOLE DEC

    end

    function fract_inc(keycode, shifts) -- ledig

    ipc.display("keycode="..keycode.."\nshifts="..shifts.."\nlabel = punkt ledig")

    if select == 0 then ipc.control(65643, 0) end --NAV1 RADIO FRACT_INC

    if select == 1 then ipc.control(65647, 0) end --NAV2 RADIO FRACT_INC

    if select == 2 then ipc.control(65639, 0) end -- COM1 RADIO FRACT_INC

    if select == 3 then ipc.control(66440, 0) end -- COM2 RADIO FRACT_INC

    end

    function fract_dec(keycode, shifts) -- ledig

    ipc.display("keycode="..keycode.."\nshifts="..shifts.."\nlabel =mm minus ledig")

    if select == 0 then ipc.control(65642, 0) end --NAV1 RADIO FRACT_DEC

    if select == 1 then ipc.control(65646, 0) end --NAV2 RADIO FRACT_DEC

    if select == 2 then ipc.control(65638, 0) end -- COM1 RADIO FRACT_DEC

    if select == 3 then ipc.control(66438, 0) end -- COM2 RADIO FRACT_DEC

    end

    function com_sel(keycode, shifts) -- COM SEL label

    if select > 2 then

    select = 2

    else select = 3

    end

    ipc.display("keycode="..keycode.."\nshifts="..shifts.."\nselect="..select.."\nlabel= COM SEL label")

    end

    function nav_sel(keycode, shifts) -- NAV SEL label

    if select > 0 then

    select = 0

    else select = 1

    end

    ipc.display("keycode="..keycode.."\nshifts="..shifts.."\nselect="..select.."\nlabel= NAV SEL label")

    end

    -- Enable event on keys being pressed (only)

    event.key(78, 8, "swap_label") -- <-> label n-key

    event.key(77, 8, "whole_inc") -- SEL + label m-key

    -- when I press this key I would like the incremation in the function to step step-step-step-step as long as i press the key

    event.key(188, 8, "whole_dec") -- SEL - label komma_key

    -- same for this

    event.key(190, 8, "fract_inc") -- ledig punkt_key

    -- and for this

    event.key(189, 8, "fract_dec") -- ledig minus_key

    -- and for this

    event.key(72, 8, "com_sel") -- COM SEL label h_key

    -- first press select COM1 next press select Com2, next pres selectt com1 and so on

    event.key(74, 8, "nav_sel") -- NAV SEL label j_key

    -- same for select nav radio

    Hope you understand my program and can give me a hint!

    /Jonny

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