Results 1 to 6 of 6
  1. #1
    500+ This must be a daytime job



    Join Date
    Jan 2007
    Location
    NEW ZEALAND
    Posts
    908
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    SIOC Cold and Dark for GA

    Hi All,
    Wanting to make my displays go dark when turning of Battery switch.
    I have lost my way with the code. Ive listed what i can and would appreciate
    any help in correcting or adding anything missing. Ive listed the script for
    RPM .
    Hope someone can help.
    Code:
    // *****************************************************************************
    // * Config_SIOC ver 4.01   -     By Manuel Velez    -    www.opencockpits.com
    // *****************************************************************************
    // * FileName : crscoldanddark.txt
    // * Date : 5/19/2013
    Var 0130, name RPM, Link FSUIPC_IN, Offset $0898, Length 2, Type 1
     {
      CALL &OutRPM
      
    
      L0 = &RPM * 10800
      L1 = L0 / 65536
      L2 = MOD L1 ,10
      &Digitrt = L2    
      L1 = DIV L1 ,10
      L2 = MOD L1 ,10
      &Digitl1 = L2    
      L1 = DIV L1 ,10
      L2 = MOD L1 ,10
      &digitl2 = L2    
      L1 = DIV L1 ,10
      L2 = MOD L1 ,10
      IF L2 = 0
      {
        &Digitl3 = -999999    
      }
      ELSE
      {
        &Digitl3 = L2    
      }
    }
    
    Var 0131, name Digitrt, Link IOCARD_DISPLAY, Digit 0, Numbers 1
    
    Var 0132, name Digitl1, Link IOCARD_DISPLAY, Digit 1, Numbers 1
    
    Var 0133, name digitl2, Link IOCARD_DISPLAY, Digit 2, Numbers 1
    
    Var 0134, name Digitl3, Link IOCARD_DISPLAY, Digit 3, Numbers 1
    
    
    
    
    
    
    Var 0006, name ColdAndDark, Link FSUIPC_IN, Offset $3102, Length 1     // MASTER BATTERY OFF =0
    
    Var 0002, name OutRPM, Link SUBRUTINE
    {
      IF &ColdAndDark = 0
      {
        V0131 = -999999 
        V0132 = -999999
        V0133 = -999999
        V0134 = -999999
      }
     
     
    }
    Thanks
    Les
    P.s Sorry about the code not being tagged. Not sure how im supposed to dot.
    Last edited by iwik; 05-22-2013 at 01:48 AM. Reason: PuttingTags around code

  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

    Re: SIOC Cold and Dark for GA

    Hi Les,

    Try this:
    Code:
    Var 130 name RPM Link FSUIPC_IN Offset $0898 Length 2 Type 1
    {
      CALL &OutRPM
    }
    
    
    Var 131 name ColdAndDark Link FSUIPC_IN Offset $3102 Length 1 // MASTER BATTERY OFF =0
    {
      CALL &OutRPM
    }
    
    
    Var 132 name OutRPM Link SUBRUTINE
    {
      IF &ColdAndDark = 0
      {
        &Digitrt = -999999 
        &Digitl1 = -999999 
        &Digitl2 = -999999 
        &Digitl3 = -999999
      }
      ELSE
      {
        L0 = &RPM * 10800
        L1 = L0 / 65536
        L2 = MOD L1 ,10
        &Digitrt = L2 
        L1 = DIV L1 ,10
        L2 = MOD L1 ,10
        &Digitl1 = L2 
        L1 = DIV L1 ,10
        L2 = MOD L1 ,10
        &Digitl2 = L2 
        L1 = DIV L1 ,10
        L2 = MOD L1 ,10
        IF L2 = 0
        {
          &Digitl3 = -999999 
        }
        ELSE
        {
          &Digitl3 = L2 
        }
      }
    }
    
    
    Var 133 name Digitrt Link IOCARD_DISPLAY Digit 0 Numbers 1
    Var 134 name Digitl1 Link IOCARD_DISPLAY Digit 1 Numbers 1
    Var 135 name Digitl2 Link IOCARD_DISPLAY Digit 2 Numbers 1
    Var 136 name Digitl3 Link IOCARD_DISPLAY Digit 3 Numbers 1
    Cheers,
    Nico

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



    Join Date
    Jan 2007
    Location
    NEW ZEALAND
    Posts
    908
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC Cold and Dark for GA

    Thanks Nico,
    I'm afraid i wouldnt have got there without your help.
    Can tell me how to enclose my code like you have done. I managed it once but not sure what i did.
    I see there is a icon called " Put tags around Code".Do you have to place the cursor at beginning
    of your code and hit the icon and do the same at the end?.

    Regards
    Les

  4. #4
    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

    Re: SIOC Cold and Dark for GA

    Hi Les,

    I do not use these icons, but i'm writing 'tags' around the code.

    I have put the instructions in a file, otherwise they will be interpreted here...

    Cheers,
    Nico
    Last edited by kiek; 05-21-2013 at 03:33 PM.

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



    Join Date
    Jan 2007
    Location
    NEW ZEALAND
    Posts
    908
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC Cold and Dark for GA

    Thanks Nico,
    You can see i have success.
    Les

  6. #6
    10+ Posting Member
    Join Date
    Jan 2014
    Location
    PAN-PAN
    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: SIOC Cold and Dark for GA

    I am also struggling with cold and dark for the default FSX 737 and the OC MCP. Does anyone have a script for this?
    Thanks.