PDA

View Full Version : SIOC Cold and Dark for GA



iwik
05-21-2013, 03:08 AM
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.


// *****************************************************************************
// * Config_SIOC ver 4.01 - By Manuel Velez - www.opencockpits.com (http://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.

kiek
05-21-2013, 12:41 PM
Hi Les,

Try this:


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

iwik
05-21-2013, 02:34 PM
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

kiek
05-21-2013, 03:26 PM
Hi Les,

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

I have put the instructions in a file (http://www.lekseecon.nl/downloads/SIOC_CODE.txt), otherwise they will be interpreted here...

Cheers,
Nico

iwik
05-22-2013, 01:49 AM
Thanks Nico,
You can see i have success.
Les

Seaiii
02-14-2014, 04:31 PM
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.