Results 1 to 3 of 3
  1. #1
    10+ Posting Member
    Join Date
    Jan 2008
    Location
    PORTUGAL
    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

    Flaps with servo script

    Hello!

    I'm searching for a SIOC script for the flaps gauge with servo. Can anyone please tell me where to find it?

    Tank you

    Regards
    Henrique

  2. #2
    500+ This must be a daytime job



    Join Date
    Jul 2013
    Posts
    917
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Flaps with servo script

    Henrique

    Here you are

    Regards

    David


    // **************************************

    Var 0095, name LE_EXT_LED, Link IOCARD_OUT, Output 41

    Var 0096, name LE_TRANS_LED, Link IOCARD_OUT, Output 39

    Var 0099, name FLAPS_IN, Link FSUIPC_INOUT, Offset $0BE0, Length 4
    {
    L0 = &FLAPS_IN
    L0 = ABS L0
    L2 = L0
    IF L0 < 10
    {
    &LE_EXT_LED = 0
    &LE_TRANS_LED = 0
    }
    C0 = L0 >= 10
    C1 = L0 <= 408
    IF C0 AND C1
    {
    &LE_TRANS_LED = 1
    &LE_EXT_LED = 0
    }
    IF L0 > 408
    {
    C0 = L0 > 2049
    C1 = L0 < 4095
    IF C0 AND C1
    {
    &LE_TRANS_LED = 1
    &LE_EXT_LED = 0
    }
    ELSE
    {
    &LE_TRANS_LED = 0
    &LE_EXT_LED = 1
    }
    }
    C0 = L0 >= 0
    C1 = L0 <= 409
    IF C0 AND C1
    {
    &x1 = 0 // between 0 and 1
    &x2 = 409
    &y1 = 1023
    &y2 = 950
    }
    C0 = L0 >= 409
    C1 = L0 <= 819
    IF C0 AND C1
    {
    &x1 = 409
    &x2 = 819
    &y1 = 950
    &y2 = 760 // between 1 and 2
    }
    C0 = L0 >= 819
    C1 = L0 <= 2047
    IF C0 AND C1
    {
    &x1 = 819
    &x2 = 2047
    &y1 = 760
    &y2 = 650 // between 2 and 5
    }
    C0 = L0 >= 2047
    C1 = L0 <= 4095
    IF C0 AND C1
    {
    &x1 = 2047
    &x2 = 4095
    &y1 = 650
    &y2 = 500 // between 5 and 10
    }
    C0 = L0 >= 4095
    C1 = L0 <= 6143
    IF C0 AND C1
    {
    &x1 = 4095
    &x2 = 6143
    &y1 = 500
    &y2 = 400 // between 10 and 15
    }
    C0 = L0 >= 6143
    C1 = L0 <= 10239
    IF C0 AND C1
    {
    &x1 = 6143
    &x2 = 10239
    &y1 = 400
    &y2 = 300 // between 15 and 25
    }
    C0 = L0 >= 10239
    C1 = L0 <= 12287
    IF C0 AND C1
    {
    &x1 = 10239
    &x2 = 12287
    &y1 = 300
    &y2 = 220 // between 25 and 30
    }
    C0 = L0 >= 12287
    C1 = L0 <= 16383
    IF C0 AND C1
    {
    &x1 = 12287
    &x2 = 16383
    &y1 = 220
    &y2 = 179 // between 30 and 40
    }
    &dy21 = &y2 - &y1
    &dx21 = &x2 - &x1
    &dx = L0 - &x1
    &dy = &dy21 * &dx
    &dy = &dy / &dx21
    L1 = &y1 + &dy
    &FLAPSERVO = L1
    }

    Var 0086, name dy

    Var 0087, name dx21

    Var 0088, name dy21

    Var 0089, name dx

    Var 0090, name x1

    Var 0091, name x2

    Var 0092, name y1

    Var 0093, name y2

    var 0022, name FLAPSERVO, Link USB_SERVOS,Output 1, POSL 177, POSC 512, POSR 1024

  3. #3
    10+ Posting Member
    Join Date
    Jan 2008
    Location
    PORTUGAL
    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: Flaps with servo script

    Tank you very much David!

    Regards
    Henrique

Similar Threads

  1. SIOC script for Fuel Temp Servo ?
    By markusr in forum OpenCockpits General Discussion
    Replies: 3
    Last Post: 12-02-2009, 03:28 PM
  2. SIOC script for the Brake Pressure gauge with servo?
    By HondaCop in forum OpenCockpits General Discussion
    Replies: 10
    Last Post: 08-03-2009, 09:31 AM
  3. Some problems with OC servo flaps gauge
    By dimon2kgb in forum I/O Interfacing Hardware and Software
    Replies: 1
    Last Post: 11-26-2008, 04:48 AM
  4. Flaps Script Help
    By cesarfsim in forum OpenCockpits General Discussion
    Replies: 1
    Last Post: 06-25-2008, 05:13 PM