1
0
Fork 0

Merge branch 'dev' into 3D

This commit is contained in:
legoboyvdlp R 2021-07-30 12:37:01 +01:00
commit 573702ed63
6 changed files with 164 additions and 24 deletions

View file

@ -3083,6 +3083,10 @@
<value>0</value> <value>0</value>
<value>1</value> <value>1</value>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/knb1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
@ -3447,6 +3451,10 @@
<command>property-toggle</command> <command>property-toggle</command>
<property>modes/pfd/ILS1</property> <property>modes/pfd/ILS1</property>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/btn1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
<animation> <animation>
@ -3482,6 +3490,10 @@
<command>property-toggle</command> <command>property-toggle</command>
<property>modes/pfd/ILS2</property> <property>modes/pfd/ILS2</property>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/btn1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
<animation> <animation>
@ -3554,9 +3566,12 @@
} else { } else {
fcu.cpt_efis_btns("off"); fcu.cpt_efis_btns("off");
} }
setprop("sim/sounde/btn1", 1);
</script> </script>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/btn1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
<animation> <animation>
@ -3596,9 +3611,12 @@
} else { } else {
fcu.fo_efis_btns("off"); fcu.fo_efis_btns("off");
} }
setprop("sim/sounde/btn1", 1);
</script> </script>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/btn1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
<animation> <animation>
@ -3638,9 +3656,12 @@
} else { } else {
fcu.cpt_efis_btns("off"); fcu.cpt_efis_btns("off");
} }
setprop("sim/sounde/btn1", 1);
</script> </script>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/btn1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
<animation> <animation>
@ -3680,9 +3701,12 @@
} else { } else {
fcu.fo_efis_btns("off"); fcu.fo_efis_btns("off");
} }
setprop("sim/sounde/btn1", 1);
</script> </script>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/btn1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
<animation> <animation>
@ -3722,9 +3746,12 @@
} else { } else {
fcu.cpt_efis_btns("off"); fcu.cpt_efis_btns("off");
} }
setprop("sim/sounde/btn1", 1);
</script> </script>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/btn1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
<animation> <animation>
@ -3764,9 +3791,12 @@
} else { } else {
fcu.fo_efis_btns("off"); fcu.fo_efis_btns("off");
} }
setprop("sim/sounde/btn1", 1);
</script> </script>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/btn1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
<animation> <animation>
@ -3806,9 +3836,12 @@
} else { } else {
fcu.cpt_efis_btns("off"); fcu.cpt_efis_btns("off");
} }
setprop("sim/sounde/btn1", 1);
</script> </script>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/btn1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
<animation> <animation>
@ -3848,9 +3881,12 @@
} else { } else {
fcu.fo_efis_btns("off"); fcu.fo_efis_btns("off");
} }
setprop("sim/sounde/btn1", 1);
</script> </script>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/btn1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
<animation> <animation>
@ -3890,9 +3926,12 @@
} else { } else {
fcu.cpt_efis_btns("off"); fcu.cpt_efis_btns("off");
} }
setprop("sim/sounde/btn1", 1);
</script> </script>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/btn1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
<animation> <animation>
@ -3932,9 +3971,12 @@
} else { } else {
fcu.fo_efis_btns("off"); fcu.fo_efis_btns("off");
} }
setprop("sim/sounde/btn1", 1);
</script> </script>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/btn1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
<animation> <animation>
@ -4121,6 +4163,10 @@
<value>1</value> <!-- VOR --> <value>1</value> <!-- VOR -->
<value>-1</value> <!-- ADF --> <value>-1</value> <!-- ADF -->
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/switch1", 1);</script>
</binding>
</action> </action>
<action> <action>
<button>1</button> <button>1</button>
@ -4132,6 +4178,10 @@
<value>1</value> <!-- VOR --> <value>1</value> <!-- VOR -->
<value>0</value> <!-- OFF --> <value>0</value> <!-- OFF -->
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/switch1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
<animation> <animation>
@ -4161,6 +4211,10 @@
<value>1</value> <!-- VOR --> <value>1</value> <!-- VOR -->
<value>-1</value> <!-- ADF --> <value>-1</value> <!-- ADF -->
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/switch1", 1);</script>
</binding>
</action> </action>
<action> <action>
<button>1</button> <button>1</button>
@ -4172,6 +4226,10 @@
<value>1</value> <!-- VOR --> <value>1</value> <!-- VOR -->
<value>0</value> <!-- OFF --> <value>0</value> <!-- OFF -->
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/switch1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
<animation> <animation>
@ -4201,6 +4259,10 @@
<value>1</value> <!-- VOR --> <value>1</value> <!-- VOR -->
<value>-1</value> <!-- ADF --> <value>-1</value> <!-- ADF -->
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/switch1", 1);</script>
</binding>
</action> </action>
<action> <action>
<button>1</button> <button>1</button>
@ -4212,6 +4274,10 @@
<value>1</value> <!-- VOR --> <value>1</value> <!-- VOR -->
<value>0</value> <!-- OFF --> <value>0</value> <!-- OFF -->
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/switch1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
<animation> <animation>
@ -4241,6 +4307,10 @@
<value>1</value> <!-- VOR --> <value>1</value> <!-- VOR -->
<value>-1</value> <!-- ADF --> <value>-1</value> <!-- ADF -->
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/switch1", 1);</script>
</binding>
</action> </action>
<action> <action>
<button>1</button> <button>1</button>
@ -4252,6 +4322,10 @@
<value>1</value> <!-- VOR --> <value>1</value> <!-- VOR -->
<value>0</value> <!-- OFF --> <value>0</value> <!-- OFF -->
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/switch1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
<animation> <animation>
@ -6675,6 +6749,10 @@
} }
</script> </script>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/btn1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
@ -6709,6 +6787,10 @@
} }
</script> </script>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/btn1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
@ -9279,6 +9361,10 @@
<value>1</value> <value>1</value>
<value>2</value> <value>2</value>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/btn1", 1);</script>
</binding>
</action> </action>
</animation> </animation>
@ -9296,6 +9382,10 @@
<value>1</value> <value>1</value>
<value>2</value> <value>2</value>
</binding> </binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/btn1", 1);</script>
</binding>
</action> </action>
</animation> </animation>

View file

@ -222,6 +222,7 @@ var canvas_ND_1 = {
# here we make the ND: # here we make the ND:
me.NDCpt = ND.new("/instrumentation/efis", myCockpit_switches, "Airbus"); me.NDCpt = ND.new("/instrumentation/efis", myCockpit_switches, "Airbus");
me.NDCpt.attitude_heading_setting = -1; 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.adirs_property = props.globals.getNode("/instrumentation/efis[0]/nd/ir-1",1);
me.NDCpt.newMFD(canvas_group); me.NDCpt.newMFD(canvas_group);
me.NDCpt.change_phase = 0; me.NDCpt.change_phase = 0;
@ -247,6 +248,7 @@ var canvas_ND_2 = {
myCockpit_switches["ADIRS"]= {path: "/nd/ir-2", value: 0, type: "BOOL"}; myCockpit_switches["ADIRS"]= {path: "/nd/ir-2", value: 0, type: "BOOL"};
me.NDFo = ND.new("/instrumentation/efis[1]", myCockpit_switches, "Airbus"); me.NDFo = ND.new("/instrumentation/efis[1]", myCockpit_switches, "Airbus");
me.NDFo.attitude_heading_setting = 1; 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.adirs_property = props.globals.getNode("/instrumentation/efis[1]/nd/ir-2",1);
me.NDFo.newMFD(canvas_group); me.NDFo.newMFD(canvas_group);
me.NDFo.change_phase = 0; me.NDFo.change_phase = 0;

View file

@ -707,18 +707,33 @@ 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), 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", 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), 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(),
}, },
}, },
{ {

View file

@ -47,6 +47,13 @@ var MessageQueueController = {
me.messages.pop(index); me.messages.pop(index);
} }
}, },
deleteWithText: func(text) {
foreach (var message; me.messages.vector) {
if (message.msgText == text) {
me.messages.remove(message);
}
}
},
clearQueue: func() { clearQueue: func() {
me.messages.clear(); 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("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("TO SPEED TOO LOW", "amb", 0),
TypeIIMessage.new("CHECK DEST DATA", "amb", 0), #p.533 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 # to speed to low - new on a320, margin against vmcg / vs1g
@ -202,7 +210,7 @@ var MessageController = {
}, },
getMsgByText: func(text, theVector) { getMsgByText: func(text, theVector) {
foreach (var message; theVector) { foreach (var message; theVector) {
if (message.msgText = text) { if (message.msgText == text) {
return message; return message;
} }
} }

View file

@ -217,14 +217,14 @@ var lskbutton = func(btn, i) {
setprop("/MCDU[" ~ i ~ "]/active", 1); setprop("/MCDU[" ~ i ~ "]/active", 1);
settimer(func(){ settimer(func(){
pageNode[i].setValue(getprop("/MCDU[" ~ i ~ "]/last-fmgc-page")); 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", 2);
setprop("/MCDU[" ~ i ~ "]/active-system","fmgc"); setprop("/MCDU[" ~ i ~ "]/active-system","fmgc");
}, 2); }, 2);
} else { } else {
pageNode[i].setValue(getprop("/MCDU[" ~ i ~ "]/last-fmgc-page")); pageNode[i].setValue(getprop("/MCDU[" ~ i ~ "]/last-fmgc-page"));
setprop("/MCDU[" ~ i ~ "]/active-system","fmgc"); setprop("/MCDU[" ~ i ~ "]/active-system","fmgc");
mcdu_scratchpad.scratchpads[i].empty(); mcdu_scratchpad.scratchpads[i].clear();
} }
} }
} else if (page == "IRSINIT") { } else if (page == "IRSINIT") {
@ -377,14 +377,14 @@ var lskbutton = func(btn, i) {
setprop("/MCDU[" ~ i ~ "]/atsu-active", 1); setprop("/MCDU[" ~ i ~ "]/atsu-active", 1);
settimer(func(){ settimer(func(){
pageNode[i].setValue(getprop("/MCDU[" ~ i ~ "]/last-atsu-page")); 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 ~ "]/atsu-active", 2);
setprop("/MCDU[" ~ i ~ "]/active-system","atsu"); setprop("/MCDU[" ~ i ~ "]/active-system","atsu");
}, 2); }, 2);
} else { } else {
pageNode[i].setValue(getprop("/MCDU[" ~ i ~ "]/last-atsu-page")); pageNode[i].setValue(getprop("/MCDU[" ~ i ~ "]/last-atsu-page"));
setprop("/MCDU[" ~ i ~ "]/active-system","atsu"); setprop("/MCDU[" ~ i ~ "]/active-system","atsu");
mcdu_scratchpad.scratchpads[i].empty(); mcdu_scratchpad.scratchpads[i].clear();
} }
} }
} else if (page == "INITA") { } else if (page == "INITA") {

View file

@ -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);
@ -154,7 +153,6 @@ var ADIRU = {
if (me._gs > 5 or abs(me._pitch) > 5 or abs(me._roll) > 10) { if (me._gs > 5 or abs(me._pitch) > 5 or abs(me._roll) > 10) {
me.stopAlignNoAlign(); me.stopAlignNoAlign();
me._excessMotion = 1; me._excessMotion = 1;
print("Excessive motion, restarting");
me.update(); # update operative me.update(); # update operative
me.align(calcAlignTime(pts.Position.latitude.getValue())); me.align(calcAlignTime(pts.Position.latitude.getValue()));
} elsif (me.operative == 0) { } elsif (me.operative == 0) {
@ -324,6 +322,8 @@ var ADIRS = {
} }
), ),
], ],
_hasGPSPrimLost: 0,
_hasGPSPrim: 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,7 +345,32 @@ 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 {
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 # Update VFE
foreach (var update_item; me.update_items) { foreach (var update_item; me.update_items) {