GPS PRIMARY LOST
This commit is contained in:
parent
0b44b47a7d
commit
5eaad7d98f
2 changed files with 22 additions and 7 deletions
|
@ -707,18 +707,22 @@ canvas.NDStyles["Airbus"] = {
|
||||||
id: "nd_warn_memo",
|
id: "nd_warn_memo",
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd, symbol),
|
init: func(nd, symbol),
|
||||||
predicate: ALWAYS,
|
predicate: func(nd) {
|
||||||
is_true: func(nd) nd.symbols.nd_warn_memo.hide(),
|
!systems.ADIRS.Operating.aligned[0].getBoolValue() and !systems.ADIRS.Operating.aligned[1].getBoolValue() and !systems.ADIRS.Operating.aligned[2].getBoolValue()
|
||||||
is_false: func(nd),
|
},
|
||||||
|
is_true: func(nd) nd.symbols.nd_warn_memo.show(),
|
||||||
|
is_false: func(nd) nd.symbols.nd_warn_memo.hide(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "nd_warn_msgbox",
|
id: "nd_warn_msgbox",
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd, symbol),
|
init: func(nd, symbol),
|
||||||
predicate: ALWAYS,
|
predicate: func(nd) {
|
||||||
is_true: func(nd) nd.symbols.nd_warn_msgbox.hide(),
|
!systems.ADIRS.Operating.aligned[0].getBoolValue() and !systems.ADIRS.Operating.aligned[1].getBoolValue() and !systems.ADIRS.Operating.aligned[2].getBoolValue()
|
||||||
is_false: func(nd),
|
},
|
||||||
|
is_true: func(nd) nd.symbols.nd_warn_msgbox.show(),
|
||||||
|
is_false: func(nd) nd.symbols.nd_warn_msgbox.hide(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -110,7 +110,6 @@ var ADIRU = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
stopAlignNoAlign: func() {
|
stopAlignNoAlign: func() {
|
||||||
print("Stopping alignment or setting unaligned state");
|
|
||||||
me.inAlign = 0;
|
me.inAlign = 0;
|
||||||
me.aligned = 0;
|
me.aligned = 0;
|
||||||
ADIRSnodesND[me.num].setValue(0);
|
ADIRSnodesND[me.num].setValue(0);
|
||||||
|
@ -324,6 +323,7 @@ var ADIRS = {
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
_hasGPSPrimLost: 0,
|
||||||
loop: func(notification) {
|
loop: func(notification) {
|
||||||
if (me._init) {
|
if (me._init) {
|
||||||
for (i = 0; i < _NUMADIRU; i = i + 1) {
|
for (i = 0; i < _NUMADIRU; i = i + 1) {
|
||||||
|
@ -345,8 +345,19 @@ var ADIRS = {
|
||||||
me.Operating.adr[i].setValue(0);
|
me.Operating.adr[i].setValue(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!me.Operating.aligned[0].getBoolValue() and !me.Operating.aligned[1].getBoolValue() and !me.Operating.aligned[2].getBoolValue()) {
|
||||||
|
if (!me._hasGPSPrimLost) {
|
||||||
|
mcdu_scratchpad.messageQueues[0].addNewMsg(mcdu_scratchpad.MessageController.getTypeIIMsgByText("GPS PRIMARY LOST"));
|
||||||
|
mcdu_scratchpad.messageQueues[1].addNewMsg(mcdu_scratchpad.MessageController.getTypeIIMsgByText("GPS PRIMARY LOST"));
|
||||||
|
}
|
||||||
|
me._hasGPSPrimLost = 1;
|
||||||
|
} else {
|
||||||
|
me._hasGPSPrimLost = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Update VFE
|
# Update VFE
|
||||||
foreach (var update_item; me.update_items) {
|
foreach (var update_item; me.update_items) {
|
||||||
update_item.update(notification);
|
update_item.update(notification);
|
||||||
|
|
Loading…
Add table
Reference in a new issue