ND range/mode change modifications, transition hides all route/vor elements
This commit is contained in:
parent
7bc27a893e
commit
977ffafb66
2 changed files with 26 additions and 28 deletions
|
@ -387,6 +387,21 @@ setlistener("sim/signals/fdm-initialized", func {
|
||||||
canvas_nd.ND_2.NDFo.trafficGroup.setVisible(getprop("/instrumentation/efis[1]/nd/canvas-display-mode") == "PLAN" ? 0 : 1);
|
canvas_nd.ND_2.NDFo.trafficGroup.setVisible(getprop("/instrumentation/efis[1]/nd/canvas-display-mode") == "PLAN" ? 0 : 1);
|
||||||
}, 1, 0);
|
}, 1, 0);
|
||||||
|
|
||||||
|
setlistener("/instrumentation/efis[0]/nd/display-mode", func {
|
||||||
|
startChangePhase(canvas_nd.ND_1.NDCpt,"MODE CHANGE");
|
||||||
|
},0,0);
|
||||||
|
|
||||||
|
setlistener("/instrumentation/efis[0]/inputs/range-nm", func {
|
||||||
|
startChangePhase(canvas_nd.ND_1.NDCpt,"RANGE CHANGE");
|
||||||
|
},0,0);
|
||||||
|
setlistener("/instrumentation/efis[1]/nd/display-mode", func {
|
||||||
|
startChangePhase(canvas_nd.ND_2.NDFo,"MODE CHANGE");
|
||||||
|
},0,0);
|
||||||
|
|
||||||
|
setlistener("/instrumentation/efis[1]/inputs/range-nm", func {
|
||||||
|
startChangePhase(canvas_nd.ND_2.NDFo,"RANGE CHANGE");
|
||||||
|
},0,0);
|
||||||
|
|
||||||
nd_update.start();
|
nd_update.start();
|
||||||
if (getprop("systems/acconfig/options/nd-rate") > 1) {
|
if (getprop("systems/acconfig/options/nd-rate") > 1) {
|
||||||
rateApply();
|
rateApply();
|
||||||
|
@ -439,21 +454,6 @@ var startChangePhase = func(nd,txt) {
|
||||||
nd.change_timer.start();
|
nd.change_timer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
setlistener("/instrumentation/efis[0]/nd/display-mode", func {
|
|
||||||
startChangePhase(canvas_nd.ND_1.NDCpt,"MODE CHANGE");
|
|
||||||
},0,0);
|
|
||||||
|
|
||||||
setlistener("/instrumentation/efis[0]/inputs/range-nm", func {
|
|
||||||
startChangePhase(canvas_nd.ND_1.NDCpt,"RANGE CHANGE");
|
|
||||||
},0,0);
|
|
||||||
setlistener("/instrumentation/efis[1]/nd/display-mode", func {
|
|
||||||
startChangePhase(canvas_nd.ND_2.NDFo,"MODE CHANGE");
|
|
||||||
},0,0);
|
|
||||||
|
|
||||||
setlistener("/instrumentation/efis[1]/inputs/range-nm", func {
|
|
||||||
startChangePhase(canvas_nd.ND_2.NDFo,"RANGE CHANGE");
|
|
||||||
},0,0);
|
|
||||||
|
|
||||||
#setlistener("/instrumentation/efis[0]/nd/terrain-on-nd", func{
|
#setlistener("/instrumentation/efis[0]/nd/terrain-on-nd", func{
|
||||||
# var terr_on_hd = getprop("instrumentation/efis[0]/nd/terrain-on-nd");
|
# var terr_on_hd = getprop("instrumentation/efis[0]/nd/terrain-on-nd");
|
||||||
# var alpha = 1;
|
# var alpha = 1;
|
||||||
|
|
|
@ -791,7 +791,6 @@ canvas.NDStyles["Airbus"] = {
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg") != nil and
|
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg") != nil and
|
||||||
getprop("/FMGC/flightplan[2]/active") and
|
|
||||||
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)),
|
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)),
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
nd.symbols.wpActiveId.setText(getprop("/FMGC/flightplan[2]/current-leg"));
|
nd.symbols.wpActiveId.setText(getprop("/FMGC/flightplan[2]/current-leg"));
|
||||||
|
@ -805,7 +804,6 @@ canvas.NDStyles["Airbus"] = {
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg") != nil and
|
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg") != nil and
|
||||||
getprop("/FMGC/flightplan[2]/active") and
|
|
||||||
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)),
|
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]) and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)),
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
#var cur_wp = getprop("/autopilot/route-manager/current-wp");
|
#var cur_wp = getprop("/autopilot/route-manager/current-wp");
|
||||||
|
@ -830,7 +828,6 @@ canvas.NDStyles["Airbus"] = {
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) (getprop("/FMGC/flightplan[2]/current-leg-dist") != nil and
|
predicate: func(nd) (getprop("/FMGC/flightplan[2]/current-leg-dist") != nil and
|
||||||
getprop("/FMGC/flightplan[2]/active") and
|
|
||||||
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"])
|
nd.in_mode("toggle_display_mode", ["MAP", "PLAN"])
|
||||||
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
|
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
|
@ -859,7 +856,7 @@ canvas.NDStyles["Airbus"] = {
|
||||||
id: "eta",
|
id: "eta",
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) getprop("/autopilot/route-manager/wp/eta") != nil and getprop("/FMGC/flightplan[2]/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"])
|
predicate: func(nd) getprop("/autopilot/route-manager/wp/eta") != nil and getprop("/FMGC/flightplan[2]/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"])
|
||||||
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)),
|
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting)),
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
var etaSec = getprop("/sim/time/utc/day-seconds")+
|
var etaSec = getprop("/sim/time/utc/day-seconds")+
|
||||||
|
@ -1293,9 +1290,9 @@ canvas.NDStyles["Airbus"] = {
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd){
|
predicate: func(nd){
|
||||||
nd.get_switch("toggle_display_mode") == "MAP" and
|
nd.get_switch("toggle_display_mode") == "MAP" and !nd.get_switch("toggle_centered")
|
||||||
!nd.get_switch("toggle_centered") and
|
and (nd.change_phase != 1)
|
||||||
(
|
and (
|
||||||
getprop(nd.options.defaults.lat_ctrl) != nd.options.defaults.managed_val or
|
getprop(nd.options.defaults.lat_ctrl) != nd.options.defaults.managed_val or
|
||||||
nd.get_switch("toggle_trk_line")
|
nd.get_switch("toggle_trk_line")
|
||||||
)
|
)
|
||||||
|
@ -1311,6 +1308,7 @@ canvas.NDStyles["Airbus"] = {
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) (nd.in_mode("toggle_display_mode", ["APP","VOR","MAP"]) and nd.get_switch("toggle_centered")
|
predicate: func(nd) (nd.in_mode("toggle_display_mode", ["APP","VOR","MAP"]) and nd.get_switch("toggle_centered")
|
||||||
|
and (nd.change_phase != 1)
|
||||||
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
|
and (nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
nd.symbols.trkInd2.show();
|
nd.symbols.trkInd2.show();
|
||||||
|
@ -1324,7 +1322,7 @@ canvas.NDStyles["Airbus"] = {
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) (nd.get_switch("toggle_display_mode") == "MAP" and
|
predicate: func(nd) (nd.get_switch("toggle_display_mode") == "MAP" and
|
||||||
nd.get_switch("toggle_centered") and
|
nd.get_switch("toggle_centered") and (nd.change_phase != 1) and
|
||||||
getprop(nd.options.defaults.lat_ctrl) != nd.options.defaults.managed_val and
|
getprop(nd.options.defaults.lat_ctrl) != nd.options.defaults.managed_val and
|
||||||
(nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
|
(nd.adirs_property.getValue() == 1 or (adirs_3.getValue() == 1 and att_switch.getValue() == nd.attitude_heading_setting))),
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
|
@ -1337,7 +1335,7 @@ canvas.NDStyles["Airbus"] = {
|
||||||
id:"vorCrsPtr",
|
id:"vorCrsPtr",
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) (nd.in_mode("toggle_display_mode", ["APP","VOR"]) and !nd.get_switch("toggle_centered")),
|
predicate: func(nd) (nd.in_mode("toggle_display_mode", ["APP","VOR"]) and !nd.get_switch("toggle_centered")) and (nd.change_phase != 1),
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
nd.symbols.vorCrsPtr.show();
|
nd.symbols.vorCrsPtr.show();
|
||||||
if (is_ils) {
|
if (is_ils) {
|
||||||
|
@ -1354,7 +1352,7 @@ canvas.NDStyles["Airbus"] = {
|
||||||
id:"vorCrsPtr2",
|
id:"vorCrsPtr2",
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) (nd.in_mode("toggle_display_mode", ["APP","VOR"]) and nd.get_switch("toggle_centered")),
|
predicate: func(nd) (nd.in_mode("toggle_display_mode", ["APP","VOR"]) and nd.get_switch("toggle_centered")) and (nd.change_phase != 1),
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
nd.symbols.vorCrsPtr2.show();
|
nd.symbols.vorCrsPtr2.show();
|
||||||
var is_ils = (nd.get_switch("toggle_display_mode") == "APP");
|
var is_ils = (nd.get_switch("toggle_display_mode") == "APP");
|
||||||
|
@ -1381,7 +1379,7 @@ canvas.NDStyles["Airbus"] = {
|
||||||
id: "gsDiamond",
|
id: "gsDiamond",
|
||||||
impl: {
|
impl: {
|
||||||
init: func(nd,symbol),
|
init: func(nd,symbol),
|
||||||
predicate: func(nd) nd.in_mode("toggle_display_mode", ["APP"]),
|
predicate: func(nd) nd.in_mode("toggle_display_mode", ["APP"]) and (nd.change_phase != 1),
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
if(getprop("/instrumentation/nav/gs-needle-deflection-norm") != nil)
|
if(getprop("/instrumentation/nav/gs-needle-deflection-norm") != nil)
|
||||||
nd.symbols.gsDiamond.setTranslation(getprop("/instrumentation/nav[0]/gs-needle-deflection-norm")*150,0);
|
nd.symbols.gsDiamond.setTranslation(getprop("/instrumentation/nav[0]/gs-needle-deflection-norm")*150,0);
|
||||||
|
@ -1449,7 +1447,7 @@ canvas.NDStyles["Airbus"] = {
|
||||||
var ils_mode = getprop("/Flight-management/freq/ils-mode");
|
var ils_mode = getprop("/Flight-management/freq/ils-mode");
|
||||||
var has_ils = (nav_id != nil and nav_id != "");
|
var has_ils = (nav_id != nil and nav_id != "");
|
||||||
(nd.get_switch("toggle_display_mode") == "MAP" and
|
(nd.get_switch("toggle_display_mode") == "MAP" and
|
||||||
!nd.get_switch("toggle_centered") and has_ils and ils_mode);
|
!nd.get_switch("toggle_centered") and has_ils and ils_mode and (nd.change_phase != 1));
|
||||||
},
|
},
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
nd.symbols.locTrkPointer.show();
|
nd.symbols.locTrkPointer.show();
|
||||||
|
@ -1469,7 +1467,7 @@ canvas.NDStyles["Airbus"] = {
|
||||||
var ils_mode = getprop("/Flight-management/freq/ils-mode");
|
var ils_mode = getprop("/Flight-management/freq/ils-mode");
|
||||||
var has_ils = (nav_id != nil and nav_id != "");
|
var has_ils = (nav_id != nil and nav_id != "");
|
||||||
(nd.get_switch("toggle_display_mode") == "MAP" and
|
(nd.get_switch("toggle_display_mode") == "MAP" and
|
||||||
nd.get_switch("toggle_centered") and has_ils and ils_mode);
|
nd.get_switch("toggle_centered") and has_ils and ils_mode and (nd.change_phase != 1));
|
||||||
},
|
},
|
||||||
is_true: func(nd) {
|
is_true: func(nd) {
|
||||||
nd.symbols.locTrkPointer2.show();
|
nd.symbols.locTrkPointer2.show();
|
||||||
|
|
Loading…
Reference in a new issue