Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    75+ Posting Member
    Join Date
    Oct 2012
    Location
    London ON, CA
    Posts
    106
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Gear lever for pmdg737ngx Sioc..?

    Can I get some help with this gear lever script
    when i use default script it works fine for the lights but not the lever
    this is info from offsets file for pmdg, default sioc script uses default offsets and they worked fine strangely enough for LIGHT INDICATORS


    offset size datatype name notes
    6570 3 BYTE MAIN_annunGEAR_transit[3] Boolean
    6573 3 BYTE MAIN_annunGEAR_locked[3] Boolean
    6576 1 BYTE MAIN_GearLever 0: UP 1: OFF 2: DOWN
    I also tried this to assign as button and change parameters
    i just used 69632+455=70087.. then CUSTOM control in fsuipc and assign parameters like 0, 1 and 2
    similar method worked fine for all my switches like for example MAIN PANEL DU's SELECTOR etc.. but in case of the landing gear it does nothing

    // Gear panel
    #define EVT_GEAR_LEVER (THIRD_PARTY_EVENT_ID_MIN + 455)
    #define EVT_GEAR_LEVER_OFF (THIRD_PARTY_EVENT_ID_MIN + 4551)
    #define EVT_GEAR_LEVER_UNLOCK (THIRD_PARTY_EVENT_ID_MIN + 4552)
    I will also try to use the key assignment using the pmdg's FMC.. worked very well for the dual encoders i used for NI-SET and SPD-REF, but for landing gear there is only "G" for both up and down.. not like there is shifg+g for up and "G" for down.. so i was hoping to do it with switches/sioc/fsuipc but not key press... idk.. i am lost here i thought that one would be easy...

    or maybe can someone point me to where written script is for landing gear for pmdg737ngx

    Thanks
    Andy

  2. #2
    25+ Posting Member



    Join Date
    Aug 2009
    Location
    Oss - Netherlands
    Posts
    61
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Gear lever for pmdg737ngx Sioc..?

    Hi Andy,

    As no one has replied, and I have no knowledge of SIOC maybe my answer is totally wrong, but I was browsing on the internet and found something relating to your question. Maybe it helps.

    Source: some small sdk puzzle left - PMDG 737NGX - The AVSIM Community

    ..Also nr. 2 is now solved. Got a response via a pmdg ticket within 24 hours in the weekend (thanks again guys!). Don't send 1,2 or 3 as suggested by the MAIN_GearLever variable to EVT_GEAR_LEVER, but the mouse events MOUSE_FLAG_LEFTSINGLE resp. MOUSE_FLAG_RIGHTSINGLE to EVT_GEAR_LEVER and MOUSE_FLAG_LEFTSINGLE to EVT_GEAR_LEVER_OFF for gear down, up and off.HTHJohan Knol



  3. #3
    75+ Posting Member
    Join Date
    Oct 2012
    Location
    London ON, CA
    Posts
    106
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Gear lever for pmdg737ngx Sioc..?

    Thanks Sammy I will give it a try.

    for now i got a work around using key press with G i post it here just for kicks what i did, but these MouseEvents should work much better cuz if one was to use what i did it must be done in sequence or gets messed up but i still post it just in case someone cares:

    must start on ground,
    so in FSUIPC when your lower micros-witch is pressed (lever down) send G do not repeat and NOTHING when relesed
    when you upper micro-switch is pressed send command G do not repeat and send command shift+G when released shift+g is programed to GEAR OFF then when you lower lever (Down) G is pressed GEAR go down and so on in the circle

    but yeah whatever my way is limited so thanks i will try the mouse events.

    Andy

  4. #4
    75+ Posting Member
    Join Date
    Jun 2012
    Location
    New Orleans, LA
    Posts
    130
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Gear lever for pmdg737ngx Sioc..?

    Are your gear lever switches connected to an opencockpits card or a joystick card, like a bodnar card?

  5. #5
    75+ Posting Member
    Join Date
    Oct 2012
    Location
    London ON, CA
    Posts
    106
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Gear lever for pmdg737ngx Sioc..?

    yes i hoked them up to oc mastercard

  6. #6
    75+ Posting Member
    Join Date
    Jun 2012
    Location
    New Orleans, LA
    Posts
    130
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Gear lever for pmdg737ngx Sioc..?

    Quote Originally Posted by AndyCYXU View Post
    yes i hoked them up to oc mastercard
    Oh, and how many? Two?

  7. #7
    75+ Posting Member
    Join Date
    Jun 2012
    Location
    New Orleans, LA
    Posts
    130
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Gear lever for pmdg737ngx Sioc..?

    It looks like there's something up with the Gear level control codes. However, you can set keystrokes to the gear lever in the FMC.


    PMDG SETUP > OPTIONS > Key Commands > Center FWD Panel

    Set a keystroke for each Gear position.

    I'd first convert the two O/C inputs to virtual joysticks and use FSUIPC to trigger the inputs.

    (CHANGE DEVICE, INPUT AND OUTPUT NUMBERS ACCORDINGLY)

    Code:
    Var 1 Link IOCARD_SW device 1 Input 55 Type I
    {
    &FO_JoyStick64 = CHANGEBIT 0 v1 // toggle button 0 of joystick 64 - GEAR UP
    }
    
    Var 3 Link IOCARD_SW device 1 Input 56 Type I
    {
    &FO_JoyStick64 = CHANGEBIT 1 v3 // toggle button 1 of joystick 64 - GEAR DOWN
    }
    
    Var 2 name FO_JoyStick64 Link FSUIPC_OUT Offset $3340 Length 4
    Next I'd setup the buttons in FSUIPC.

    Throw the gear level into the up position, check the 'Select for keypress" button and set these options:

    - Press the key to be sent when you press this button: (use keystroke for gear up)
    - Press the key to be sent when you release this button: (use the keystroke for gear off)


    Throw the gear level into the down position, check the 'Select for keypress" button and set this option:

    - Press the key to be sent when you press this button: (use keystroke for gear down)

    And then for controlling the gear lights, we'll let the NGX to do the logic and just output the state in SIOC.

    Code:
    Var 0032, name gearlock_led1, Link IOCARD_OUT, Device 1, Output 15     // LED
    
    Var 0033, name gearlock_led2, Link IOCARD_OUT, Device 1, Output 12     // LED
    
    Var 0034, name gearlock_led3, Link IOCARD_OUT, Device 1, Output 16     // LED
    
    Var 0035, name gearlock_1, Link FSUIPC_IN, Offset $6573, Length 1     // state
    {
      IF &gearlock_1 = 0
      {
        &gearlock_led1 = 0    
      }
      ELSE
      {
        &gearlock_led1 = 1    
      }
    }
    
    Var 0036, name gearlock_2, Link FSUIPC_IN, Offset $6574, Length 1     // state
    {
      IF &gearlock_2 = 0
      {
        &gearlock_led2 = 0    
      }
      ELSE
      {
        &gearlock_led2 = 1    
      }
    }
    
    Var 0037, name gearlock_3, Link FSUIPC_IN, Offset $6575, Length 1     // state
    {
      IF &gearlock_3 = 0
      {
        &gearlock_led3 = 0    
      }
      ELSE
      {
        &gearlock_led3 = 1    
      }
    }
    
    Var 0038, name geartran_led1, Link IOCARD_OUT, Device 1, Output 13     // LED
    
    Var 0039, name geartran_led2, Link IOCARD_OUT, Device 1, Output 11     // LED
    
    Var 0040, name geartran_led3, Link IOCARD_OUT, Device 1, Output 14     // LED
    
    Var 0041, name geartran_1, Link FSUIPC_IN, Offset $6570, Length 1     // state
      {
        IF &geartran_1 = 0
        {
          &geartran_led1 = 0    
        }
        ELSE
        {
          &geartran_led1 = 1    
        }
      }
    
    Var 0042, name geartran_2, Link FSUIPC_IN, Offset $6571, Length 1     // state
      {
        IF &geartran_2 = 0
        {
          &geartran_led2 = 0    
        }
        ELSE
        {
          &geartran_led2 = 1    
        }
      }
    
    Var 0043, name geartran_3, Link FSUIPC_IN, Offset $6572, Length 1     // state
      {
        IF &geartran_3 = 0
        {
          &geartran_led3 = 0    
        }
        ELSE
        {
          &geartran_led3 = 1    
        }
      }
    Hope that helps.

  8. #8
    75+ Posting Member
    Join Date
    Oct 2012
    Location
    London ON, CA
    Posts
    106
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Gear lever for pmdg737ngx Sioc..?

    Next I'd setup the buttons in FSUIPC.

    Throw the gear level into the up position, check the 'Select for keypress" button and set these options:

    - Press the key to be sent when you press this button: (use keystroke for gear up)
    - Press the key to be sent when you release this button: (use the keystroke for gear off)


    Throw the gear level into the down position, check the 'Select for keypress" button and set this option:

    - Press the key to be sent when you press this button: (use keystroke for gear down)
    yup this is exactly what i did I just didn't explain it well
    there is a keystoke to setup as GEAR-OFF do note however, that there is no separate keystroke for GEAR DOWN or GEAR UP (unless I am blind) but there is only one default=G so one has to be careful if you move from GEAR OFF to GEAR UP while your gear is actually UP it will just GO DOWN not good, but then i suppose once gear is in OFF position the next sequence should be GEAR DOWN so it actually works good

    Andy

  9. #9
    75+ Posting Member
    Join Date
    Jun 2012
    Location
    New Orleans, LA
    Posts
    130
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Gear lever for pmdg737ngx Sioc..?

    I thought i saw you can set three custom keystrokes in the NGX fmc options for each gear lever position (up, off, down).

  10. #10
    75+ Posting Member
    Join Date
    Oct 2012
    Location
    London ON, CA
    Posts
    106
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Gear lever for pmdg737ngx Sioc..?

    well i just double checked and nope, only:
    <GEAR LEVER UP/DOWN <--- set to G for BOTH
    <GEAR LEVER OFF <--- set to SHIFT+G
    <GEAR LEVER UNLOCK <--- I don't use this for nothing set to CTRL+G just visual really you can see the red tiger move on VC nothing else (i suppose you can assign it to command to be sent when DOWN micro switch is released.. you see it move but since i don't see my VC nah... just leave it..

    but anyways when set up like you explained works great just have to remember to follow the sequence and never move from OFF to UP but i suppose in real aircraft that be similar they go from TAKEOFF>>>DOWN to UP to OFF then DOWN>>>LAND ...just my uneducated guess

    say you need to GO AROUND you have to go again from gear being DOWN>to>UP>to>OFF>to>DOWN and so on... it is actually OK to skip the OFF part as you move from UP directly to DOWN command OFF will be sent but as soon as you put it in DOWN command G will be send...

    Andy

Page 1 of 2 12 LastLast