markusr
10-23-2009, 10:04 AM
Hi all,
i tried to get the following working with SIOC:
If Aircraft on ground and Engine is running, than one LED should go on.
If the Engines are off the LED should be off.
If the Aircraft is in the Air, the LED should be off, except if the Flapstatus is >0 than the led should be again on.
I tried it with the following (without Flap Status in this example.):
Var 0013, name Aircft_GND, Link FSUIPC_IN, Offset $0366, Length 2 //
Ground=1 / air=0
{
IF &Aircft_GND = 1
{
IF &OilP1 > 2383
{
&_Eng1_RAM_Door = 1
}
IF &OilP1 < 2383
{
&_Eng1_RAM_Door = 0
}
}
ELSE
{
&_Eng1_RAM_Door = 0
}
}
the next what i tried was with subroutines:
Var 0013, name Aircft_GND, Link FSUIPC_IN, Offset $0366, Length 2 // Ground=1 / air=0
{
IF &Aircft_GND = 1
{
CALL &sub1
}
ELSE
{
&_Eng1_RAM_Door = 0
}
}
Var 0014, name Flapsstate, Link FSUIPC_IN, Offset $0BDC, Length 4 // Flaps state 0=up
Var 0015, name sub1, Link SUBRUTINE
{
IF &OilP1 < 2380
{
CALL &sub2
}
ELSE
{
&_Eng1_RAM_Door = 1
}
}
Var 0017, name sub2, Link SUBRUTINE
{
&_Eng1_RAM_Door = 0
}
The status of the LED is only correct when i reload the script with SIOC.
Any Ideas how to get this working correct??
thanks for all hints,
Markus
i tried to get the following working with SIOC:
If Aircraft on ground and Engine is running, than one LED should go on.
If the Engines are off the LED should be off.
If the Aircraft is in the Air, the LED should be off, except if the Flapstatus is >0 than the led should be again on.
I tried it with the following (without Flap Status in this example.):
Var 0013, name Aircft_GND, Link FSUIPC_IN, Offset $0366, Length 2 //
Ground=1 / air=0
{
IF &Aircft_GND = 1
{
IF &OilP1 > 2383
{
&_Eng1_RAM_Door = 1
}
IF &OilP1 < 2383
{
&_Eng1_RAM_Door = 0
}
}
ELSE
{
&_Eng1_RAM_Door = 0
}
}
the next what i tried was with subroutines:
Var 0013, name Aircft_GND, Link FSUIPC_IN, Offset $0366, Length 2 // Ground=1 / air=0
{
IF &Aircft_GND = 1
{
CALL &sub1
}
ELSE
{
&_Eng1_RAM_Door = 0
}
}
Var 0014, name Flapsstate, Link FSUIPC_IN, Offset $0BDC, Length 4 // Flaps state 0=up
Var 0015, name sub1, Link SUBRUTINE
{
IF &OilP1 < 2380
{
CALL &sub2
}
ELSE
{
&_Eng1_RAM_Door = 1
}
}
Var 0017, name sub2, Link SUBRUTINE
{
&_Eng1_RAM_Door = 0
}
The status of the LED is only correct when i reload the script with SIOC.
Any Ideas how to get this working correct??
thanks for all hints,
Markus