Results 1 to 5 of 5
  1. #1
    25+ Posting Member
    Join Date
    Aug 2007
    Location
    Kallinge, Sweden
    Posts
    29
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Emulate switch with momentary button?

    Following up my default FSX SIOC config with a new thread.

    I'm trying to emulate a toggle switch (the GPS/NAV) with a momentary button on my OC MCP (VNAV button).

    So far I have managed to switch it, but as the button is momentary
    the switch goes back to previous state when I release the button.

    Is there away to make this working?
    This is the setup I have come up with so far.

    Var 0032, Link FSUIPC_INOUT, Offset $132C, Length 4 // AP_VNAV emulate NAV/GPS Switch
    {
    IF V0032 <> 1
    {
    &O_VNAV = 1
    }
    ELSE
    {
    &O_VNAV = 0
    }
    }

    Var 0090, name O_VNAV, Link IOCARD_OUT, Output 25

    Var 0154, name I_VNAV, Link IOCARD_SW, Input 30
    {
    IF &I_VNAV <> 1
    {
    V0032 = 1
    }
    ELSE
    {
    V0032 = 0
    }
    }

    I have an idea that I can possibly use 2 buttons , VNAV and LNAV that are note used in the default FSX 737 anyway.

    Could that be a solution?

  2. #2
    2000+ Poster - Never Leaves the Sim
    Join Date
    Mar 2008
    Location
    France,Nice
    Posts
    2,652
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Edited: I have a problem of dyslexia when it comes to your variables I think , this should work:



    Var 0032, name SWITCH Link FSUIPC_INOUT, Offset $132C, Length 4 // AP_VNAV emulate NAV/GPS Switch
    {
    $O_VNAV=$SWITCH
    }



    Var 0090, name O_VNAV, Link IOCARD_OUT, Output 25


    Var 0154, name I_VNAV, Link IOCARD_SW, Input 30
    {
    IF $SWITCH = 0
    {
    $SWITCH = 1

    }
    ELSE
    {
    &SWITCH = 0

    }
    }

  3. #3
    25+ Posting Member
    Join Date
    Aug 2007
    Location
    Kallinge, Sweden
    Posts
    29
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Thanks, but something is wrong with it. Sioc_config won't let it pass.

    $O_VNAV=$SWITCH

    Should it be &O_VNAV=$SWITCH ?

    Just bit confused, but it's getting too late here.... 02:00 in the night
    Brain is shutting down...

  4. #4
    2000+ Poster - Never Leaves the Sim
    Join Date
    Mar 2008
    Location
    France,Nice
    Posts
    2,652
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    I have tested this one with sioc:

    Var 0032, name SWITCH, Link FSUIPC_INOUT, Offset $132C, Length 4
    {
    &O_VNAV = &SWITCH
    }

    Var 0090, name O_VNAV, Link IOCARD_OUT, Output 25

    Var 0154, Link IOCARD_SW, Input 30, Type P // I_VNAV
    {
    IF &SWITCH = 0
    {
    &SWITCH = 1
    }
    ELSE
    {
    &SWITCH = 0
    }
    }



    Be careful with wordwrap when copying/pasting, else I don't why it went wrong, as it's late here as well

  5. Thanks CoNa thanked for this post
  6. #5
    25+ Posting Member
    Join Date
    Aug 2007
    Location
    Kallinge, Sweden
    Posts
    29
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Thanks, that did the trick
    I really appreciate the support I get here.
    Make it a bit easier being a noob.

Similar Threads

  1. Airbus switches - momentary or toggle?
    By ryanf in forum General Builder Questions All Aircraft Types
    Replies: 23
    Last Post: 08-11-2016, 03:52 AM
  2. How can I make COMM TEST button PUSH to TALK button ???
    By Nick1150 in forum OpenCockpits General Discussion
    Replies: 2
    Last Post: 09-29-2010, 09:50 AM
  3. Momentary buttons
    By AndyT in forum Computer Hardware Setup
    Replies: 3
    Last Post: 11-12-2008, 10:05 AM
  4. momentary switches and assignments
    By aviaparts in forum FS2Phidget Users
    Replies: 8
    Last Post: 09-18-2008, 10:05 AM
  5. Whats the easiest way to control/emulate fs2004 functions
    By Simran737 in forum I/O Interfacing Hardware and Software
    Replies: 3
    Last Post: 09-29-2007, 12:49 PM