Add OVERFLY function
This commit is contained in:
parent
1b9790c536
commit
c3669c2419
9 changed files with 30 additions and 18 deletions
Binary file not shown.
|
@ -1673,7 +1673,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
<!--animation>
|
<animation>
|
||||||
<type>pick</type>
|
<type>pick</type>
|
||||||
<object-name>overfly</object-name>
|
<object-name>overfly</object-name>
|
||||||
<action>
|
<action>
|
||||||
|
@ -1696,7 +1696,7 @@
|
||||||
</condition>
|
</condition>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation-->
|
</animation>
|
||||||
<animation>
|
<animation>
|
||||||
<type>pick</type>
|
<type>pick</type>
|
||||||
<object-name>clr</object-name>
|
<object-name>clr</object-name>
|
||||||
|
|
|
@ -1673,7 +1673,7 @@
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
<!--animation>
|
<animation>
|
||||||
<type>pick</type>
|
<type>pick</type>
|
||||||
<object-name>overfly</object-name>
|
<object-name>overfly</object-name>
|
||||||
<action>
|
<action>
|
||||||
|
@ -1696,7 +1696,7 @@
|
||||||
</condition>
|
</condition>
|
||||||
</binding>
|
</binding>
|
||||||
</action>
|
</action>
|
||||||
</animation-->
|
</animation>
|
||||||
<animation>
|
<animation>
|
||||||
<type>pick</type>
|
<type>pick</type>
|
||||||
<object-name>clr</object-name>
|
<object-name>clr</object-name>
|
||||||
|
|
|
@ -432,16 +432,11 @@ var ITAF = {
|
||||||
}
|
}
|
||||||
Internal.lnavAdvanceNm.setValue(FPLN.turnDist);
|
Internal.lnavAdvanceNm.setValue(FPLN.turnDist);
|
||||||
|
|
||||||
# Advance logic done by flightplan controller
|
if (FPLN.wp0Dist.getValue() <= FPLN.turnDist and !Gear.wow1.getBoolValue() and fmgc.flightPlanController.flightplans[2].getWP(FPLN.currentWpTemp).fly_type == "flyBy") {
|
||||||
if (FPLN.wp0Dist.getValue() <= FPLN.turnDist and !Gear.wow1.getBoolValue()) {
|
flightPlanController.autoSequencing();
|
||||||
|
} elsif (FPLN.wp0Dist.getValue() <= 0.15) {
|
||||||
flightPlanController.autoSequencing();
|
flightPlanController.autoSequencing();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (FPLN.wp0Dist.getValue() <= FPLN.turnDist and !Gear.wow1.getBoolValue() and fmgc.flightPlanController.flightplans[2].getWP(FPLN.currentWpTemp).fly_type == "flyBy") {
|
|
||||||
# flightPlanController.autoSequencing();
|
|
||||||
#} elsif (FPLN.wp0Dist.getValue() <= 0.1) {
|
|
||||||
# flightPlanController.autoSequencing();
|
|
||||||
#}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -245,6 +245,19 @@ var flightPlanController = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# changeOverflyType - toggle flyby type of passed waypoint
|
||||||
|
# args: index, plan, computer
|
||||||
|
# index: index to toggle
|
||||||
|
# plan: plan on which operation is performed
|
||||||
|
# If the passed waypoint exists, toggle its flyover attribute
|
||||||
|
changeOverFlyType: func(index, plan) {
|
||||||
|
wp = me.flightplans[plan].getWP(index);
|
||||||
|
if (wp == nil or wp.wp_name == "DISCONTINUITY" or wp.wp_name == "VECTORS") { return 1; };
|
||||||
|
|
||||||
|
wp.fly_type = (wp.fly_type == "flyBy") ? "flyOver" : "flyBy";
|
||||||
|
return 2;
|
||||||
|
},
|
||||||
|
|
||||||
# for these two remember to call flightPlanChanged. We are assuming this is called from a function which will all flightPlanChanged itself.
|
# for these two remember to call flightPlanChanged. We are assuming this is called from a function which will all flightPlanChanged itself.
|
||||||
|
|
||||||
# addDiscontinuity - insert discontinuity at passed index
|
# addDiscontinuity - insert discontinuity at passed index
|
||||||
|
@ -730,6 +743,8 @@ var flightPlanController = {
|
||||||
|
|
||||||
if (size(split("/", text)) == 3) {
|
if (size(split("/", text)) == 3) {
|
||||||
return me.getWPforPBD(text, index, thePlan);
|
return me.getWPforPBD(text, index, thePlan);
|
||||||
|
} elsif (text == "@") {
|
||||||
|
return me.changeOverFlyType(index, thePlan);
|
||||||
} elsif (text == "CLR") {
|
} elsif (text == "CLR") {
|
||||||
return me.deleteWP(index, thePlan, 0);
|
return me.deleteWP(index, thePlan, 0);
|
||||||
} elsif (size(text) > 12) {
|
} elsif (size(text) > 12) {
|
||||||
|
|
|
@ -20,9 +20,9 @@ var fplnItem = {
|
||||||
return ["MANUAL", me.getSubText(), me.colour];
|
return ["MANUAL", me.getSubText(), me.colour];
|
||||||
} else {
|
} else {
|
||||||
if (size(wptName) == 2) {
|
if (size(wptName) == 2) {
|
||||||
return[wptName[0] ~ wptName[1], me.getSubText(), me.colour];
|
return[wptName[0] ~ wptName[1 ~ (me.wp.fly_type == "flyOver" ? "@" : "")], me.getSubText(), me.colour];
|
||||||
} else {
|
} else {
|
||||||
return [me.wp.wp_name, me.getSubText(), me.colour];
|
return [me.wp.wp_name ~ (me.wp.fly_type == "flyOver" ? "@" : ""), me.getSubText(), me.colour];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1531,6 +1531,8 @@ var button = func(btn, i, event = "") {
|
||||||
} else {
|
} else {
|
||||||
mcdu_scratchpad.scratchpads[i].addChar("-");
|
mcdu_scratchpad.scratchpads[i].addChar("-");
|
||||||
}
|
}
|
||||||
|
} else if (btn == "OVFY") {
|
||||||
|
mcdu_scratchpad.scratchpads[i].addChar("@");
|
||||||
} else {
|
} else {
|
||||||
mcdu_scratchpad.scratchpads[i].addChar(btn);
|
mcdu_scratchpad.scratchpads[i].addChar(btn);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1255,7 +1255,7 @@
|
||||||
<legend>^</legend>
|
<legend>^</legend>
|
||||||
<pref-height>25</pref-height>
|
<pref-height>25</pref-height>
|
||||||
<pref-width>25</pref-width>
|
<pref-width>25</pref-width>
|
||||||
<!--binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>mcdu.button("OVFY", 0);</script>
|
<script>mcdu.button("OVFY", 0);</script>
|
||||||
<condition>
|
<condition>
|
||||||
|
@ -1264,7 +1264,7 @@
|
||||||
<value>110</value>
|
<value>110</value>
|
||||||
</greater-than-equals>
|
</greater-than-equals>
|
||||||
</condition>
|
</condition>
|
||||||
</binding-->
|
</binding>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button>
|
<button>
|
||||||
|
|
|
@ -1262,7 +1262,7 @@
|
||||||
<legend>^</legend>
|
<legend>^</legend>
|
||||||
<pref-height>25</pref-height>
|
<pref-height>25</pref-height>
|
||||||
<pref-width>25</pref-width>
|
<pref-width>25</pref-width>
|
||||||
<!--binding>
|
<binding>
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>mcdu.button("OVFY", 1);</script>
|
<script>mcdu.button("OVFY", 1);</script>
|
||||||
<condition>
|
<condition>
|
||||||
|
@ -1271,7 +1271,7 @@
|
||||||
<value>110</value>
|
<value>110</value>
|
||||||
</greater-than-equals>
|
</greater-than-equals>
|
||||||
</condition>
|
</condition>
|
||||||
</binding-->
|
</binding>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button>
|
<button>
|
||||||
|
|
Loading…
Reference in a new issue