Results 1 to 4 of 4
  1. #1
    300+ Forum Addict jmig's Avatar
    Join Date
    Apr 2007
    Location
    Lafayette, LA USA
    Posts
    440
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    HDG works but CRS doesn't?

    Once again my ignorance shows. I am scratching my head as to WHY the heading will change but the course won't, within FSX.

    Here is the applicable code from my soic.ssi I have also included the results of the IOCP Console file. You will see that the HDG is writing one extra line to the FSUIPC offset that the CRS. However the two routines are exactly the same with different V numbers, V names, and offsets.

    SO??? Why isn't the CRS sending the final result to FSX? The code was copied from an example.

    IOCP Console
    3013=1 - RO_HDG
    3011=265 - HDG
    3010=48230 - X_HDG
    3013=0 - RO_HDG
    3010=48242 - X_HDG
    3=1 - Battery_Master // I did this to seperate the two so I could compare them easier
    2=1 - Battery
    3023=1 - RO_CRS
    3021=323 - CRS
    3020=58786 - X_CRS
    3023=0 - RO_CRS


    //********************************* Heading ********************************

    Var 3010, name X_HDG, Link FSUIPC_INOUT, Offset $07CC, Length 2
    {
    // convert from fsuipc range to degrees:
    L0 = DIV &X_HDG, 182

    IF &HDG != L0
    {
    &HDG = L0
    }
    }

    Var 3011, name HDG
    {
    CALL &OutHDG
    }

    Var 3012, name OutHDG, Link SUBRUTINE
    {
    // &D_HDG = &HDG // For use with display

    // convert from degrees to fsuipc range:
    L0 = &HDG * 182
    IF &X_HDG != L0
    {
    &X_HDG = L0
    }
    }

    Var 3013, name RO_HDG, Link IOCARD_ENCODER, Input 40, Aceleration 4 Type 2
    {
    L0 = &RO_HDG // * -1 turning right should be plus
    &HDG = ROTATE 0, 359, L0
    }

    // Var 3014, name D_HDG, Link IOCARD_DISPLAY, Digit 0, Numbers 3 //LED display of Heading




    //********************************* Course ********************************

    Var 3020, name X_CRS, Link FSUIPC_INOUT, Offset $0C4E, Length 2
    {
    // convert from fsuipc range to degrees:
    L0 = DIV &X_CRS, 182

    IF &CRS != L0
    {
    &CRS = L0
    }
    }

    Var 3021, name CRS
    {
    CALL &OutCRS
    }

    Var 3022, name OutCRS, Link SUBRUTINE
    {
    // &D_CRS = &CRS // For use with display

    // convert from degrees to fsuipc range:
    L0 = &CRS * 182
    IF &X_CRS != L0
    {
    &X_CRS = L0
    }
    }

    Var 3023, name RO_CRS, Link IOCARD_ENCODER, Input 38, Aceleration 4 Type 2
    {
    L0 = &RO_CRS // * -1 turning right should be plus
    &CRS = ROTATE 0, 359, L0
    }

    // Var 3024, name D_CRS, Link IOCARD_DISPLAY, Digit 0, Numbers 3 //LED display of course

    Thanks in advance guys for all your help. Without you I would be grounded.
    John

    System:
    ASUS P5Q SE/R
    Intel Q9550 O/C to 3.4 GHz
    4 GB 1066 DDR2 RAM
    300 GB WD 10,000 RPM Raptor SATA Drive
    GeForce 8800 GT 512 KB RAM
    Matrox TH2Go with three 19" Sumsung 940 BX
    IR Track 4

  2. #2
    500+ This must be a daytime job
    Join Date
    Jul 2013
    Posts
    948
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: HDG works but CRS doesn't?

    John

    On the basis that your SIOC code is identical for both functions, have you tried swopping the output numbers for the encoders to see if the problem migrates from CRS to HDG? If so, then there would be a h/w issue.

    Regards

    David

  3. Thanks jmig thanked for this post
  4. #3
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,202
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: HDG works but CRS doesn't?

    Hi John,

    Your SIOC code for CRS is not correct.
    The CRS offset $0C4E in FSUIPC is in degrees (0 - 359), no need to divide by 182...

    regards,
    Nico

  5. Thanks jmig thanked for this post
  6. #4
    300+ Forum Addict jmig's Avatar
    Join Date
    Apr 2007
    Location
    Lafayette, LA USA
    Posts
    440
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: HDG works but CRS doesn't?

    Quote Originally Posted by kiek View Post
    Hi John,

    Your SIOC code for CRS is not correct.
    The CRS offset $0C4E in FSUIPC is in degrees (0 - 359), no need to divide by 182...

    regards,
    Nico
    Thanks Nico and David. I will change the code Nico. Mucho Thanks
    John

    System:
    ASUS P5Q SE/R
    Intel Q9550 O/C to 3.4 GHz
    4 GB 1066 DDR2 RAM
    300 GB WD 10,000 RPM Raptor SATA Drive
    GeForce 8800 GT 512 KB RAM
    Matrox TH2Go with three 19" Sumsung 940 BX
    IR Track 4

Similar Threads

  1. How blackbox works?
    By williamssam81 in forum General Builder Questions All Aircraft Types
    Replies: 1
    Last Post: 11-09-2009, 11:45 AM
  2. When will PM provide a CDU that works as it should be?
    By RobertVdb in forum PM Boeing FMC/CDU
    Replies: 26
    Last Post: 06-05-2009, 08:18 AM
  3. I wonder if that would trully works...
    By Spatate in forum Cockpit Parts and Motion Platforms
    Replies: 4
    Last Post: 11-03-2007, 04:41 AM
  4. My 767 Throttle Works!!!
    By redman in forum My Cockpit Update
    Replies: 0
    Last Post: 03-26-2007, 12:25 AM
  5. Still works!
    By Bob Reed in forum I/O Interfacing Hardware and Software
    Replies: 1
    Last Post: 11-03-2005, 07:27 PM