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

    Question Question for Nico !

    Hi Nico!

    I need your help urgend!

    I`m Betatester for new flightdecksoftware from www.flightdecksoftware.com

    I programmed the sioc script for their MCP and everything is working
    except CMDB botton.

    The MCP is like the PM one with their own FSUIPC Offsets.

    Read only variables for CMD-LED:
    CMDA Switch read only "0=off" , "1=on" $6DC4 Length 1

    CMDB Switch read only "0=off" , "1=on" $6DC5 Length 1

    Autopilot switch offset:
    $6DB2 Length 1
    Bits from left to right
    1= Autopilot 1 engage
    2= Autopilot 2 engage
    Write bitvalue 1 to toggle . Combinations are possible , Value is reset to "0" after reading

    Here is the section from my script:

    Var 0084, Link FSUIPC_OUT, Offset $6DB2, Length 1 // MCP CMD OFS


    Var 0087, Link FSUIPC_IN, Offset $6DC4, Length 1 // MCP CMD A LED
    {
    IF V0087 = 1
    {
    V0514 = 1
    }
    IF V0087 = 0
    {
    V0514 = 0
    }
    }
    Var 0088, Link FSUIPC_IN, Offset $6DC5, Length 1 // MCP CMD B LED
    {
    IF V0088 = 1
    {
    V0515 = 1
    }
    IF V0088 = 0
    {
    V0515 = 0
    }
    }
    Var 0213, Link IOCARD_SW, Input 21, Type P // Boton CMDA
    {
    IF V0213 = 1
    {
    V0084 = 1
    }
    ELSE
    {
    V0084 = 0
    }
    }
    Var 0214, Link IOCARD_SW, Input 19, Type P // Boton CMDB
    {
    IF V0214 = 1
    {
    V0084 = 02
    }
    ELSE
    {
    V0084 = 0
    }
    }
    Var 0514, Link IOCARD_OUT, Output 33 // Led CMDA
    Var 0515, Link IOCARD_OUT, Output 35 // Led CMDB

    With this constelation only CMDA is working correctly.

    Can you give me a tip how to programm this?
    The rest of the script works fine with the mcp software.

    Thanks very much!

    Greetings
    Georg

  2. #2
    500+ This must be a daytime job kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    698
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Hi George,

    First question: are you sure the fsuipc interface is implemented correctly? this being a beta...

    Quote Originally Posted by Georg Schneider View Post
    Autopilot switch offset:
    $6DB2 Length 1
    Bits from left to right
    1= Autopilot 1 engage
    2= Autopilot 2 engage
    Write bitvalue 1 to toggle . Combinations are possible , Value is reset to "0" after reading
    Second question:
    What do you mean with bits from left to right? I'd expect them to be defined from right to left, or more formally, from least significant to most significant.
    Normally the least significant bit is defined to be bit 0, then bit 1 and so on.

    To set bit 0 to 1 you write 1, to set bit 1 to 1 you write 2, to set bit 2 to 1 you have to write 4..

    Nico

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

    Hi Nico

    Thanks for the quick answer!

    You are right the fsuipc offsets list says "from right to left"

    So to give offset $6DB2 Length 1 the value "1" i must write "1"
    and value "2" i must write "4"

    I try it out and post my results!

    Thanks for helping anyway

    Greets
    Georg

  4. #4
    25+ Posting Member
    Join Date
    Aug 2007
    Location
    Schorndorf/Germany
    Posts
    50
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Me again!

    Problem solved!

    It was a bug in fsuipc offset.

    Thanks for your advice Nico

    Greetings Georg

Similar Threads

  1. MyCockpit.org Welcome's to Nico Kaan
    By vybhav in forum MyCockpit News and Announcements
    Replies: 3
    Last Post: 04-18-2010, 07:56 PM
  2. ATTN NICO:Your help is needed
    By iwik in forum OpenCockpits General Discussion
    Replies: 2
    Last Post: 03-21-2009, 01:48 PM