1
0
Fork 0

vor/adf fix and 000 at ND fresh start

This commit is contained in:
Inuyaksa 2021-03-03 22:54:43 +01:00
parent 164726c371
commit 430746b590

View file

@ -792,7 +792,8 @@ canvas.NDStyles["Airbus"] = {
id: "wpActiveId", id: "wpActiveId",
impl: { impl: {
init: func(nd,symbol), init: func(nd,symbol),
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg") != "" 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 +806,8 @@ canvas.NDStyles["Airbus"] = {
id: "wpActiveCrs", id: "wpActiveCrs",
impl: { impl: {
init: func(nd,symbol), init: func(nd,symbol),
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg") != "" 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");
@ -829,7 +831,8 @@ canvas.NDStyles["Airbus"] = {
id: "wpActiveDist", id: "wpActiveDist",
impl: { impl: {
init: func(nd,symbol), init: func(nd,symbol),
predicate: func(nd) (getprop("/FMGC/flightplan[2]/current-leg") != "" 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) {
@ -844,7 +847,7 @@ canvas.NDStyles["Airbus"] = {
id: "wpActiveDistLbl", id: "wpActiveDistLbl",
impl: { impl: {
init: func(nd,symbol), init: func(nd,symbol),
predicate: func(nd) getprop("/FMGC/flightplan[2]/current-leg") != "" and getprop("/FMGC/flightplan[2]/active") and nd.in_mode("toggle_display_mode", ["MAP", "PLAN"]) 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"])
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.wpActiveDistLbl.show(); nd.symbols.wpActiveDistLbl.show();
@ -1625,7 +1628,6 @@ canvas.NDStyles["Airbus"] = {
impl: { impl: {
init: func(nd,symbol), init: func(nd,symbol),
predicate: func(nd) (nd.get_switch("toggle_lh_vor_adf") != 0), predicate: func(nd) (nd.get_switch("toggle_lh_vor_adf") != 0),
#changed_only: 1,
is_true: func(nd) { is_true: func(nd) {
nd.symbols.dmeL.show(); nd.symbols.dmeL.show();
if(nd.get_switch("toggle_lh_vor_adf") < 0){ if(nd.get_switch("toggle_lh_vor_adf") < 0){
@ -1634,15 +1636,14 @@ canvas.NDStyles["Airbus"] = {
nd.symbols.vorLId.setColor(0.195,0.96,0.097); nd.symbols.vorLId.setColor(0.195,0.96,0.097);
#nd.symbols.dmeLDist.setColor(0.195,0.96,0.097); #nd.symbols.dmeLDist.setColor(0.195,0.96,0.097);
nd.symbols.dmeL.setText(""); nd.symbols.dmeL.setText("");
} } else {
else{
nd.symbols.vorL.setText("VOR 1"); nd.symbols.vorL.setText("VOR 1");
nd.symbols.vorL.setColor(1,1,1); nd.symbols.vorL.setColor(1,1,1);
nd.symbols.vorLId.setColor(1,1,1); nd.symbols.vorLId.setColor(1,1,1);
#nd.symbols.dmeLDist.setColor(1,1,1); #nd.symbols.dmeLDist.setColor(1,1,1);
nd.symbols.dmeL.setText("NM"); nd.symbols.dmeL.setText("NM");
nd.symbols.dmeL.setColor(0,0.59,0.8);
} }
nd.symbols.dmeL.setColor(0,0.59,0.8);
}, },
is_false: func(nd){ is_false: func(nd){
nd.symbols.dmeL.hide(); nd.symbols.dmeL.hide();
@ -1654,13 +1655,12 @@ canvas.NDStyles["Airbus"] = {
impl: { impl: {
init: func(nd,symbol), init: func(nd,symbol),
predicate: func(nd) (nd.get_switch("toggle_rh_vor_adf") != 0), predicate: func(nd) (nd.get_switch("toggle_rh_vor_adf") != 0),
#changed_only: 1,
is_true: func(nd) { is_true: func(nd) {
nd.symbols.dmeR.show();
if(nd.get_switch("toggle_rh_vor_adf") < 0){ if(nd.get_switch("toggle_rh_vor_adf") < 0){
nd.symbols.vorR.setText("ADF 2"); nd.symbols.vorR.setText("ADF 2");
nd.symbols.vorR.setColor(0.195,0.96,0.097); nd.symbols.vorR.setColor(0.195,0.96,0.097);
nd.symbols.vorRId.setColor(0.195,0.96,0.097); nd.symbols.vorRId.setColor(0.195,0.96,0.097);
#nd.symbols.dmeRDist.setColor(0.195,0.96,0.097);
nd.symbols.dmeR.setText(""); nd.symbols.dmeR.setText("");
} else { } else {
nd.symbols.vorR.setText("VOR 2"); nd.symbols.vorR.setText("VOR 2");
@ -1668,8 +1668,8 @@ canvas.NDStyles["Airbus"] = {
nd.symbols.vorRId.setColor(1,1,1); nd.symbols.vorRId.setColor(1,1,1);
#nd.symbols.dmeRDist.setColor(1,1,1); #nd.symbols.dmeRDist.setColor(1,1,1);
nd.symbols.dmeR.setText("NM"); nd.symbols.dmeR.setText("NM");
nd.symbols.dmeR.setColor(0,0.59,0.8);
} }
nd.symbols.dmeR.setColor(0,0.59,0.8);
}, },
is_false: func(nd){ is_false: func(nd){
nd.symbols.dmeR.hide(); nd.symbols.dmeR.hide();
@ -1705,12 +1705,10 @@ canvas.NDStyles["Airbus"] = {
nd.symbols.vorLId.setText(navID); nd.symbols.vorLId.setText(navID);
else else
nd.symbols.vorLId.setText(frq); nd.symbols.vorLId.setText(frq);
if(getprop(dme~ "in-range")){ if(getprop(dme~ "in-range"))
nd.symbols.dmeLDist.setText(sprintf("%3.1f",dst)); nd.symbols.dmeLDist.setText(sprintf("%3.1f",
} dst));
else { else nd.symbols.dmeLDist.setText(" ---");
nd.symbols.dmeLDist.setText(" ---");
}
} }
}, },
is_false: func(nd){ is_false: func(nd){
@ -1764,12 +1762,10 @@ canvas.NDStyles["Airbus"] = {
nd.symbols.vorRId.setText(navID); nd.symbols.vorRId.setText(navID);
else else
nd.symbols.vorRId.setText(frq); nd.symbols.vorRId.setText(frq);
if(getprop(dme~ "in-range")){ if(getprop(dme~ "in-range"))
nd.symbols.dmeRDist.setText(sprintf("%3.1f",dst)); nd.symbols.dmeRDist.setText(sprintf("%3.1f",
} dst));
else { else nd.symbols.dmeRDist.setText(" ---");
nd.symbols.dmeRDist.setText(" ---");
}
} }
}, },
is_false: func(nd){ is_false: func(nd){