Merge branch 'dev' into 3D
This commit is contained in:
commit
573702ed63
6 changed files with 164 additions and 24 deletions
|
@ -3083,6 +3083,10 @@
|
|||
<value>0</value>
|
||||
<value>1</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/knb1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
|
@ -3447,6 +3451,10 @@
|
|||
<command>property-toggle</command>
|
||||
<property>modes/pfd/ILS1</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -3482,6 +3490,10 @@
|
|||
<command>property-toggle</command>
|
||||
<property>modes/pfd/ILS2</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -3554,9 +3566,12 @@
|
|||
} else {
|
||||
fcu.cpt_efis_btns("off");
|
||||
}
|
||||
setprop("sim/sounde/btn1", 1);
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -3596,9 +3611,12 @@
|
|||
} else {
|
||||
fcu.fo_efis_btns("off");
|
||||
}
|
||||
setprop("sim/sounde/btn1", 1);
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -3638,9 +3656,12 @@
|
|||
} else {
|
||||
fcu.cpt_efis_btns("off");
|
||||
}
|
||||
setprop("sim/sounde/btn1", 1);
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -3680,9 +3701,12 @@
|
|||
} else {
|
||||
fcu.fo_efis_btns("off");
|
||||
}
|
||||
setprop("sim/sounde/btn1", 1);
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -3722,9 +3746,12 @@
|
|||
} else {
|
||||
fcu.cpt_efis_btns("off");
|
||||
}
|
||||
setprop("sim/sounde/btn1", 1);
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -3764,9 +3791,12 @@
|
|||
} else {
|
||||
fcu.fo_efis_btns("off");
|
||||
}
|
||||
setprop("sim/sounde/btn1", 1);
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -3806,9 +3836,12 @@
|
|||
} else {
|
||||
fcu.cpt_efis_btns("off");
|
||||
}
|
||||
setprop("sim/sounde/btn1", 1);
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -3848,9 +3881,12 @@
|
|||
} else {
|
||||
fcu.fo_efis_btns("off");
|
||||
}
|
||||
setprop("sim/sounde/btn1", 1);
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -3890,9 +3926,12 @@
|
|||
} else {
|
||||
fcu.cpt_efis_btns("off");
|
||||
}
|
||||
setprop("sim/sounde/btn1", 1);
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -3932,9 +3971,12 @@
|
|||
} else {
|
||||
fcu.fo_efis_btns("off");
|
||||
}
|
||||
setprop("sim/sounde/btn1", 1);
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -4121,6 +4163,10 @@
|
|||
<value>1</value> <!-- VOR -->
|
||||
<value>-1</value> <!-- ADF -->
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
<action>
|
||||
<button>1</button>
|
||||
|
@ -4132,6 +4178,10 @@
|
|||
<value>1</value> <!-- VOR -->
|
||||
<value>0</value> <!-- OFF -->
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -4161,6 +4211,10 @@
|
|||
<value>1</value> <!-- VOR -->
|
||||
<value>-1</value> <!-- ADF -->
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
<action>
|
||||
<button>1</button>
|
||||
|
@ -4172,6 +4226,10 @@
|
|||
<value>1</value> <!-- VOR -->
|
||||
<value>0</value> <!-- OFF -->
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -4201,6 +4259,10 @@
|
|||
<value>1</value> <!-- VOR -->
|
||||
<value>-1</value> <!-- ADF -->
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
<action>
|
||||
<button>1</button>
|
||||
|
@ -4212,6 +4274,10 @@
|
|||
<value>1</value> <!-- VOR -->
|
||||
<value>0</value> <!-- OFF -->
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -4241,6 +4307,10 @@
|
|||
<value>1</value> <!-- VOR -->
|
||||
<value>-1</value> <!-- ADF -->
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
<action>
|
||||
<button>1</button>
|
||||
|
@ -4252,6 +4322,10 @@
|
|||
<value>1</value> <!-- VOR -->
|
||||
<value>0</value> <!-- OFF -->
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/switch1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
<animation>
|
||||
|
@ -6675,6 +6749,10 @@
|
|||
}
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
|
@ -6709,6 +6787,10 @@
|
|||
}
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
|
@ -9279,10 +9361,14 @@
|
|||
<value>1</value>
|
||||
<value>2</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
<!-- ND_R chrono -->
|
||||
<!-- ND_R chrono -->
|
||||
<animation>
|
||||
<type>pick</type>
|
||||
<object-name>chrono_fo</object-name>
|
||||
|
@ -9296,6 +9382,10 @@
|
|||
<value>1</value>
|
||||
<value>2</value>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>setprop("sim/sounde/btn1", 1);</script>
|
||||
</binding>
|
||||
</action>
|
||||
</animation>
|
||||
|
||||
|
|
|
@ -222,6 +222,7 @@ var canvas_ND_1 = {
|
|||
# here we make the ND:
|
||||
me.NDCpt = ND.new("/instrumentation/efis", myCockpit_switches, "Airbus");
|
||||
me.NDCpt.attitude_heading_setting = -1;
|
||||
me.NDCpt.number = 0;
|
||||
me.NDCpt.adirs_property = props.globals.getNode("/instrumentation/efis[0]/nd/ir-1",1);
|
||||
me.NDCpt.newMFD(canvas_group);
|
||||
me.NDCpt.change_phase = 0;
|
||||
|
@ -247,6 +248,7 @@ var canvas_ND_2 = {
|
|||
myCockpit_switches["ADIRS"]= {path: "/nd/ir-2", value: 0, type: "BOOL"};
|
||||
me.NDFo = ND.new("/instrumentation/efis[1]", myCockpit_switches, "Airbus");
|
||||
me.NDFo.attitude_heading_setting = 1;
|
||||
me.NDFo.number = 1;
|
||||
me.NDFo.adirs_property = props.globals.getNode("/instrumentation/efis[1]/nd/ir-2",1);
|
||||
me.NDFo.newMFD(canvas_group);
|
||||
me.NDFo.change_phase = 0;
|
||||
|
|
|
@ -707,18 +707,33 @@ canvas.NDStyles["Airbus"] = {
|
|||
id: "nd_warn_memo",
|
||||
impl: {
|
||||
init: func(nd, symbol),
|
||||
predicate: ALWAYS,
|
||||
is_true: func(nd) nd.symbols.nd_warn_memo.hide(),
|
||||
is_false: func(nd),
|
||||
predicate: func(nd) {
|
||||
(!systems.ADIRS.Operating.aligned[0].getBoolValue() and !systems.ADIRS.Operating.aligned[1].getBoolValue() and !systems.ADIRS.Operating.aligned[2].getBoolValue())
|
||||
or (mcdu_scratchpad.scratchpads[nd.number].showTypeIIMsg and mcdu_scratchpad.scratchpads[nd.number].scratchpad == "GPS PRIMARY")
|
||||
},
|
||||
is_true: func(nd) {
|
||||
nd.symbols.nd_warn_memo.show();
|
||||
if (mcdu_scratchpad.scratchpads[nd.number].showTypeIIMsg and mcdu_scratchpad.scratchpads[nd.number].scratchpad == "GPS PRIMARY") {
|
||||
nd.symbols.nd_warn_memo.setText("GPS PRIMARY");
|
||||
nd.symbols.nd_warn_memo.setColor(0.8078,0.8039,0.8078);
|
||||
} else {
|
||||
nd.symbols.nd_warn_memo.setText("GPS PRIMARY LOST");
|
||||
nd.symbols.nd_warn_memo.setColor(0.7333,0.3803,0);
|
||||
}
|
||||
},
|
||||
is_false: func(nd) nd.symbols.nd_warn_memo.hide(),
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "nd_warn_msgbox",
|
||||
impl: {
|
||||
init: func(nd, symbol),
|
||||
predicate: ALWAYS,
|
||||
is_true: func(nd) nd.symbols.nd_warn_msgbox.hide(),
|
||||
is_false: func(nd),
|
||||
predicate: func(nd) {
|
||||
(!systems.ADIRS.Operating.aligned[0].getBoolValue() and !systems.ADIRS.Operating.aligned[1].getBoolValue() and !systems.ADIRS.Operating.aligned[2].getBoolValue())
|
||||
or (mcdu_scratchpad.scratchpads[nd.number].showTypeIIMsg and mcdu_scratchpad.scratchpads[nd.number].scratchpad == "GPS PRIMARY")
|
||||
},
|
||||
is_true: func(nd) nd.symbols.nd_warn_msgbox.show(),
|
||||
is_false: func(nd) nd.symbols.nd_warn_msgbox.hide(),
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -47,6 +47,13 @@ var MessageQueueController = {
|
|||
me.messages.pop(index);
|
||||
}
|
||||
},
|
||||
deleteWithText: func(text) {
|
||||
foreach (var message; me.messages.vector) {
|
||||
if (message.msgText == text) {
|
||||
me.messages.remove(message);
|
||||
}
|
||||
}
|
||||
},
|
||||
clearQueue: func() {
|
||||
me.messages.clear();
|
||||
},
|
||||
|
@ -190,6 +197,7 @@ var MessageController = {
|
|||
TypeIIMessage.new("STEP NOW"),TypeIIMessage.new("TIME TO EXIT", "amb", 0),TypeIIMessage.new("V1/VR/V2 DISAGREE", "amb", 0),
|
||||
TypeIIMessage.new("TO SPEED TOO LOW", "amb", 0),
|
||||
TypeIIMessage.new("CHECK DEST DATA", "amb", 0), #p.533
|
||||
TypeIIMessage.new("GPS PRIMARY"),TypeIIMessage.new("GPS PRIMARY LOST", "amb", 0),
|
||||
]),
|
||||
|
||||
# to speed to low - new on a320, margin against vmcg / vs1g
|
||||
|
@ -202,7 +210,7 @@ var MessageController = {
|
|||
},
|
||||
getMsgByText: func(text, theVector) {
|
||||
foreach (var message; theVector) {
|
||||
if (message.msgText = text) {
|
||||
if (message.msgText == text) {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -217,14 +217,14 @@ var lskbutton = func(btn, i) {
|
|||
setprop("/MCDU[" ~ i ~ "]/active", 1);
|
||||
settimer(func(){
|
||||
pageNode[i].setValue(getprop("/MCDU[" ~ i ~ "]/last-fmgc-page"));
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
mcdu_scratchpad.scratchpads[i].clear();
|
||||
setprop("/MCDU[" ~ i ~ "]/active", 2);
|
||||
setprop("/MCDU[" ~ i ~ "]/active-system","fmgc");
|
||||
}, 2);
|
||||
} else {
|
||||
pageNode[i].setValue(getprop("/MCDU[" ~ i ~ "]/last-fmgc-page"));
|
||||
setprop("/MCDU[" ~ i ~ "]/active-system","fmgc");
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
mcdu_scratchpad.scratchpads[i].clear();
|
||||
}
|
||||
}
|
||||
} else if (page == "IRSINIT") {
|
||||
|
@ -377,14 +377,14 @@ var lskbutton = func(btn, i) {
|
|||
setprop("/MCDU[" ~ i ~ "]/atsu-active", 1);
|
||||
settimer(func(){
|
||||
pageNode[i].setValue(getprop("/MCDU[" ~ i ~ "]/last-atsu-page"));
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
mcdu_scratchpad.scratchpads[i].clear();
|
||||
setprop("/MCDU[" ~ i ~ "]/atsu-active", 2);
|
||||
setprop("/MCDU[" ~ i ~ "]/active-system","atsu");
|
||||
}, 2);
|
||||
} else {
|
||||
pageNode[i].setValue(getprop("/MCDU[" ~ i ~ "]/last-atsu-page"));
|
||||
setprop("/MCDU[" ~ i ~ "]/active-system","atsu");
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
mcdu_scratchpad.scratchpads[i].clear();
|
||||
}
|
||||
}
|
||||
} else if (page == "INITA") {
|
||||
|
|
|
@ -110,7 +110,6 @@ var ADIRU = {
|
|||
}
|
||||
},
|
||||
stopAlignNoAlign: func() {
|
||||
print("Stopping alignment or setting unaligned state");
|
||||
me.inAlign = 0;
|
||||
me.aligned = 0;
|
||||
ADIRSnodesND[me.num].setValue(0);
|
||||
|
@ -154,7 +153,6 @@ var ADIRU = {
|
|||
if (me._gs > 5 or abs(me._pitch) > 5 or abs(me._roll) > 10) {
|
||||
me.stopAlignNoAlign();
|
||||
me._excessMotion = 1;
|
||||
print("Excessive motion, restarting");
|
||||
me.update(); # update operative
|
||||
me.align(calcAlignTime(pts.Position.latitude.getValue()));
|
||||
} elsif (me.operative == 0) {
|
||||
|
@ -324,6 +322,8 @@ var ADIRS = {
|
|||
}
|
||||
),
|
||||
],
|
||||
_hasGPSPrimLost: 0,
|
||||
_hasGPSPrim: 0,
|
||||
loop: func(notification) {
|
||||
if (me._init) {
|
||||
for (i = 0; i < _NUMADIRU; i = i + 1) {
|
||||
|
@ -345,8 +345,33 @@ var ADIRS = {
|
|||
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 {
|
||||
if (me._hasGPSPrimLost) {
|
||||
mcdu_scratchpad.messageQueues[0].deleteWithText("GPS PRIMARY LOST");
|
||||
mcdu_scratchpad.messageQueues[1].deleteWithText("GPS PRIMARY LOST");
|
||||
me._hasGPSPrimLost = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (me.Operating.aligned[0].getBoolValue() or me.Operating.aligned[1].getBoolValue() or me.Operating.aligned[2].getBoolValue()) {
|
||||
if (!me._hasGPSPrim) {
|
||||
mcdu_scratchpad.messageQueues[0].addNewMsg(mcdu_scratchpad.MessageController.getTypeIIMsgByText("GPS PRIMARY"));
|
||||
mcdu_scratchpad.messageQueues[1].addNewMsg(mcdu_scratchpad.MessageController.getTypeIIMsgByText("GPS PRIMARY"));
|
||||
me._hasGPSPrim = 1;
|
||||
}
|
||||
} else {
|
||||
me._hasGPSPrim = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Update VFE
|
||||
foreach (var update_item; me.update_items) {
|
||||
update_item.update(notification);
|
||||
|
|
Loading…
Reference in a new issue