Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    10+ Posting Member
    Join Date
    Oct 2015
    Location
    Lincolnshire, UK
    Posts
    17
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Adding new switch assignments

    Hi everybody,

    I was wondering if it is possible to add some new FSX assignments to Link2FSX? I am thinking in particular of the functions added by the Acceleration pack for aircraft carrier operations, Launch assist, Catapult launch & the third one which I can not think of right now!

    Are they already there or how easy would it be to add them - I would like to add these functions to my Multi starter pack project.

    Any help or ideas would be great, even if it means adding a new Arduino card due to input limitations.

    Many thanks in advance.

    Pete

  2. #2
    150+ Forum Groupie


    BushPilotWannabe's Avatar
    Join Date
    Jan 2014
    Location
    Alberta, Canada
    Posts
    176
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Adding new switch assignments

    Until an expert reply is posted.

    If the pdf "SimConnect Events" is not in your installation files, get it here. https://msdn.microsoft.com/en-us/library/cc526980.aspx Check page 35. Using version 6f of Link2fs, copy the instructions ( everything after ) "KEY_" to SimConnect Inputs under the "Experts" tab and follow the instructions.

    Since SimConnect Inputs doesn't want to deal with me any more, I am waiting to finish the current project before doing a re-install and can only offer this as is. A test code area is available to see whether the instructions are functional.

    Hugh
    ---CYXD ----- TWR --- GND ------ Closed
    ILS-- NDB -- 119.1 -- 121.9 ---- 11/2013

  3. #3
    10+ Posting Member
    Join Date
    Oct 2015
    Location
    Lincolnshire, UK
    Posts
    17
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Adding new switch assignments

    Hugh,

    Many thanks for the pointers, I have not done anything like this before but I will try and work my way through it.

    Where should I have the mentioned .pdf out of interest?

    Thanks again.

    Pete

  4. #4
    150+ Forum Groupie


    BushPilotWannabe's Avatar
    Join Date
    Jan 2014
    Location
    Alberta, Canada
    Posts
    176
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Adding new switch assignments

    Where should I have? I thought it was included in the FSX program files. Download from the above URL. It can be stored anywhere. My files are a mess, cannot offer advice there. Are you running Link2fs v6f?

    Hugh
    ---CYXD ----- TWR --- GND ------ Closed
    ILS-- NDB -- 119.1 -- 121.9 ---- 11/2013

  5. #5
    New Member
    Join Date
    Sep 2015
    Location
    Brisbane
    Posts
    4
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Adding new switch assignments

    Hi Pete,
    If you copy the command displayed in the second column of the above msdn link (event IDs) into the L2FSv6f Experts / Simconnect inputs then simply code the Y no. that relates.

    For example:
    copy TOGGLE_TAIL_HOOK_HANDLE into the Y08 slot and click reset. every time you send the Y08 command, the handle will toggle between positions.
    Alternatively
    copy SET_TAIL_HOOK_HANDLE into the Y08 slot and click reset. If you send Y081 then 1 - set tail hook, if you send Y080 then 0 - retract tail hook.

    Other commands from that list for you would be:
    TAKEOFF_ASSIST_ARM_TOGGLE
    TAKEOFF_ASSIST_ARM_SET
    TAKEOFF_ASSIST_FIRE
    TOGGLE_LAUNCH_BAR_SWITCH
    SET_LAUNCH_BAR_SWITCH

    Hope that helps
    Matt

  6. #6
    10+ Posting Member
    Join Date
    Oct 2015
    Location
    Lincolnshire, UK
    Posts
    17
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Adding new switch assignments

    Matt,

    Thanks for the reply and help, I think I understand what I have to do and will give it a try this weekend hopefully as I have been away from home all week.
    I will get back to you if I may when and if I have any problems.

    Thanks

    Pete

  7. #7
    10+ Posting Member
    Join Date
    Oct 2015
    Location
    Lincolnshire, UK
    Posts
    17
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Adding new switch assignments

    Hi Matt,

    What you sent me in the last post worked a treat, next thing is how do I add that into my sketch? I am using Jim's sketch for the Anunciator panel for the Mega card, but I want to substitute the trim adjust and the flaps for my new assignments. Do I just change the C18/19 & C14/15 for the new assignment codes Y08 - Y10?

    Below is the existing code, I think I only need to make changes here?



    if (KpinNo == 15 && KpinStateSTR == "0"){Serial.println ("C18");} // Trim adjust UP
    if (KpinNo == 16 && KpinStateSTR == "0"){Serial.println ("C19");} // Trim adjust DOWN
    if (KpinNo == 17 && KpinStateSTR == "0"){Serial.println ("C14");} // Flaps UP a bit
    if (KpinNo == 18 && KpinStateSTR == "0"){Serial.println ("C15");} // Flaps DOWN a bit
    if (KpinNo == 19 && KpinStateSTR == "0"){Serial.println ("C01");} // Gear UP
    if (KpinNo == 19 && KpinStateSTR == "1"){Serial.println ("C02");} // Gear DOWN

    Thanks in advance for your help.

  8. #8
    New Member
    Join Date
    Sep 2015
    Location
    Brisbane
    Posts
    4
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Adding new switch assignments

    Hi Pete,
    I don't see any real issues with that code except C14 and C15 are around the wrong way, but that would become obvious quickly.
    For the landing gear (or any two position switch) I wrote mine like this:

    if (KpinNo == 34){if (KpinStateSTR == "1" ){Serial.println ("C410");}else {Serial.println ("C411");}}//Nav lights

    I find it neater all on one line and reduces the lines of code.

    Cheers,
    Matt

  9. #9
    10+ Posting Member
    Join Date
    Oct 2015
    Location
    Lincolnshire, UK
    Posts
    17
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Adding new switch assignments

    Matt,

    Thanks for your help, that has worked fine.

    I am not using the trim or flaps as they are mapped to the joystick hence why I wanted to just use these for something else. I made the panel with the catapult & carrier switches and just thought I would add them on, but as these 4 inputs were not being used and already coded I thought it would be an easy option.

    Thanks again to everybody on this forum & Jim for giving this great Link2FSX interface & help to everybody.

    Thanks again Matt.

    Pete

  10. #10
    10+ Posting Member
    Join Date
    Dec 2007
    Location
    england
    Posts
    18
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Adding new switch assignments

    Quote Originally Posted by BushPilotWannabe View Post
    Until an expert reply is posted.

    If the pdf "SimConnect Events" is not in your installation files, get it here. https://msdn.microsoft.com/en-us/library/cc526980.aspx Check page 35.


    Hugh
    Hi Hugh, at the risk of looking like a right numpty, when I follow that link I cant see a PDF to download.
    Where is it hiding ?

    Cheers
    Don

Page 1 of 2 12 LastLast