Display range/mode change msg on ND
This commit is contained in:
parent
f74281235c
commit
42adeb85ed
3 changed files with 67 additions and 7 deletions
|
@ -180,6 +180,16 @@ var canvas_nd_base = {
|
|||
},
|
||||
};
|
||||
|
||||
var ND_change_timer_fn = func {
|
||||
me.change_phase += 1;
|
||||
if (me.change_phase>2) { # phase 3
|
||||
me.change_timer.stop();
|
||||
me.change_phase = 0;
|
||||
} else {
|
||||
me.map.setVisible(1); # phase 2
|
||||
}
|
||||
};
|
||||
|
||||
var canvas_ND_1 = {
|
||||
new: func(canvas_group) {
|
||||
var m = {parents: [canvas_ND_1, canvas_nd_base]};
|
||||
|
@ -191,6 +201,7 @@ var canvas_ND_1 = {
|
|||
me.NDCpt.adirs_property = props.globals.getNode("/instrumentation/efis[0]/nd/ir-1",1);
|
||||
me.NDCpt.newMFD(canvas_group);
|
||||
me.NDCpt.change_phase = 0;
|
||||
me.NDCpt.change_timer = maketimer(0.4,me.NDCpt,ND_change_timer_fn);
|
||||
me.NDCpt.update();
|
||||
|
||||
return m;
|
||||
|
@ -214,7 +225,8 @@ var canvas_ND_2 = {
|
|||
me.NDFo.attitude_heading_setting = 1;
|
||||
me.NDFo.adirs_property = props.globals.getNode("/instrumentation/efis[1]/nd/ir-2",1);
|
||||
me.NDFo.newMFD(canvas_group);
|
||||
me.NDCpt.change_phase = 0;
|
||||
me.NDFo.change_phase = 0;
|
||||
me.NDFo.change_timer = maketimer(0.4,me.NDFo,ND_change_timer_fn);
|
||||
me.NDFo.update();
|
||||
|
||||
return m;
|
||||
|
@ -419,6 +431,29 @@ for (i = 0; i < 2; i = i + 1 ) {
|
|||
});
|
||||
}
|
||||
|
||||
var startChangePhase = func(nd,txt) {
|
||||
nd.change_timer.stop();
|
||||
nd.map.setVisible(0);
|
||||
nd.symbols.nd_msg_change.setText(txt);
|
||||
nd.change_phase = 1;
|
||||
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{
|
||||
# var terr_on_hd = getprop("instrumentation/efis[0]/nd/terrain-on-nd");
|
||||
# var alpha = 1;
|
||||
|
|
|
@ -27,12 +27,12 @@
|
|||
id="namedview102"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.77702762"
|
||||
inkscape:cx="373.9808"
|
||||
inkscape:cy="476.40075"
|
||||
inkscape:cx="212.87887"
|
||||
inkscape:cy="628.74339"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer3"
|
||||
inkscape:current-layer="svg5180"
|
||||
inkscape:object-nodes="true"
|
||||
inkscape:snap-smooth-nodes="true"
|
||||
inkscape:snap-object-midpoints="true"
|
||||
|
@ -77,7 +77,10 @@
|
|||
id="guide3115" /><sodipodi:guide
|
||||
position="14.137585,913.25558"
|
||||
orientation="1,0"
|
||||
id="guide3498" /></sodipodi:namedview><metadata
|
||||
id="guide3498" /><sodipodi:guide
|
||||
position="74.643421,502.13953"
|
||||
orientation="0,-1"
|
||||
id="guide3552" /></sodipodi:namedview><metadata
|
||||
id="metadata5186"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /><dc:creator><cc:Agent><dc:title>Gijs de Rooy</dc:title></cc:Agent></dc:creator><cc:license
|
||||
|
@ -2205,4 +2208,15 @@
|
|||
id="tspan2199"
|
||||
x="510.7153"
|
||||
y="399.58936"
|
||||
style="font-size:53.3333px;line-height:1.25;fill:#ff0000">MAP NOT AVAIL</tspan></text></g></svg>
|
||||
style="font-size:53.3333px;line-height:1.25;fill:#ff0000">MAP NOT AVAIL</tspan></text></g><text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:53.3333px;line-height:0%;font-family:'Liberation Sans';text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;display:inline;fill:#0dc04b;fill-opacity:1;stroke:none"
|
||||
x="510.7153"
|
||||
y="537.58936"
|
||||
id="nd_msg_change"
|
||||
inkscape:label="#text3401"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3544"
|
||||
x="510.7153"
|
||||
y="537.58936"
|
||||
style="font-size:53.3333px;line-height:1.25;fill:#0dc04b">RANGE CHANGE</tspan></text></svg>
|
||||
|
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 141 KiB |
|
@ -2002,7 +2002,18 @@ canvas.NDStyles["Airbus"] = {
|
|||
nd.symbols.terrGroup.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "nd_msg_change",
|
||||
impl: {
|
||||
init: func(nd, symbol),
|
||||
common: func(nd) {
|
||||
var chk = (nd.change_phase != 0);
|
||||
if (chk) nd.symbols.nd_msg_change.show();
|
||||
else nd.symbols.nd_msg_change.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
], # end of vector with features
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue