SELCAL function added

Today I have added also a SELCAL function to the Overhead. During atlantic crossings the pilot will be called from ATC via SELCAL and the pilot will respond via radio than.

Click more to see the SIOC code.

Here is a video with the SELCAL function working.

var 0 // initial set to 0
{
&_LavSmoke = 0
}
Var 1313, name _LavSmoke, Link IOCARD_OUT, Device 1, Output 41     // Lavatory Smoke – Yellow LED
var 1320, name sb3selbl, Link FSUIPC_INOUT, Offset $7888, Length 1 // Help Offset – When SELCAL via Squawkbox is received this offset is toggeled to 1
{
IF &sb3selbl = 1
{
&BlinkLed = 50000 // begin value of timer
&BlinkLed = TIMER 0 -1 40
}
ELSE // A button on the Overhead is writing a 0 to 7888 when it is pushed, so the blinking LED will be stoppped
{
&BlinkLed = 1
}
}
var 1318, name SB3SELCAL, Link FSUIPC_INOUT, Offset $7b9d, Length 1 // Squawkbox Offset for Selcal – will be resetted to 0 from Squawkbox itself
{
IF &SB3SELCAL = 1
{
&sb3selbl = 1
}
}
Var 1319, name BlinkLed
{
L0 = MOD &BlinkLed 2
IF L0 = 0
{
&_LavSmoke = 0
}
ELSE
{
&_LavSmoke = 1
}
}

var 0 // initial set to 0{&_LavSmoke = 0}
Var 1313, name _LavSmoke, Link IOCARD_OUT, Device 1, Output 41     // Lavatory Smoke – Yellow LED
var 1320, name sb3selbl, Link FSUIPC_INOUT, Offset $7888, Length 1 // Help Offset – When SELCAL via Squawkbox is received this offset is toggeled to 1{    IF &sb3selbl = 1   {       &BlinkLed = 50000 // begin value of timer       &BlinkLed = TIMER 0 -1 40    } ELSE // A button on the Overhead is writing a 0 to 7888 when it is pushed, so the blinking LED will be stoppped { &BlinkLed = 1 }
}

var 1318, name SB3SELCAL, Link FSUIPC_INOUT, Offset $7b9d, Length 1 // Squawkbox Offset for Selcal – will be resetted to 0 from Squawkbox itself {  IF &SB3SELCAL = 1   {     &sb3selbl = 1   } }
Var 1319, name BlinkLed {   L0 = MOD &BlinkLed 2   IF L0 = 0   {     &_LavSmoke = 0   }   ELSE   {     &_LavSmoke = 1  } }