... | ... |
@@ -76,11 +76,15 @@ var setListeners = func { |
76 | 76 |
}, 0, 2); |
77 | 77 |
setlistener('/instrumentation/zkv1000/afcs/selected-alt-ft', |
78 | 78 |
func (n) { |
79 |
- print('/instrumentation/zkv1000/afcs/selected-alt-ft'); |
|
80 | 79 |
var val = n.getValue(); |
81 | 80 |
if (val != nil) { |
82 |
- device[0].display.screenElements['SelectedAlt-bug'].show(); |
|
83 |
- device[0].display.screenElements['SelectedAlt-top'].show(); |
|
81 |
+ if (! device[0].display.screenElements['SelectedALT'].getVisible()) { |
|
82 |
+ device[0].display.screenElements['SelectedALT'].show(); |
|
83 |
+ device[0].display.screenElements['SelectedALT-text'].show(); |
|
84 |
+ device[0].display.screenElements['SelectedALT-symbol'].show(); |
|
85 |
+ device[0].display.screenElements['SelectedALT-bug'].show(); |
|
86 |
+ device[0].display.screenElements['SelectedALT-bg'].show(); |
|
87 |
+ } |
|
84 | 88 |
device[0].display.updateSelectedALT(); |
85 | 89 |
} |
86 | 90 |
}, 0, 2); |
... | ... |
@@ -116,8 +116,7 @@ var displayClass = { |
116 | 116 |
'SelectedCRS-bg', |
117 | 117 |
'SelectedCRS-bgtext', |
118 | 118 |
'SelectedCRS-text', |
119 |
- 'SelectedAlt-bug', |
|
120 |
- 'SelectedAlt-top', |
|
119 |
+ 'SelectedALT', 'SelectedALT-bug', 'SelectedALT-bg', 'SelectedALT-symbol', |
|
121 | 120 |
'TAS', |
122 | 121 |
'GSPD', |
123 | 122 |
'BARO', |
... | ... |
@@ -139,7 +138,7 @@ var displayClass = { |
139 | 138 |
'AltLint00011' |
140 | 139 |
); |
141 | 140 |
append(groups.text, |
142 |
- 'SelectedAlt-text', |
|
141 |
+ 'SelectedALT-text', |
|
143 | 142 |
'TAS-text', |
144 | 143 |
'GSPD-text', |
145 | 144 |
'TIME-text', |
... | ... |
@@ -658,16 +657,21 @@ var displayClass = { |
658 | 657 |
|
659 | 658 |
updateSelectedALT : func { |
660 | 659 |
# animation for altitude section, called via updatedALT {{{ |
660 |
+ if (! device[0].display.screenElements['SelectedALT'].getVisible()) |
|
661 |
+ return; |
|
661 | 662 |
var selected_alt = getprop('/instrumentation/zkv1000/afcs/selected-alt-ft'); |
662 | 663 |
var delta_alt = me._updated_alt - selected_alt; |
663 | 664 |
if (abs(delta_alt) > 300) |
664 | 665 |
delta_alt = 300 * abs(delta_alt)/delta_alt; |
665 |
- me.screenElements['SelectedAlt-top'] |
|
666 |
+ me.screenElements['SelectedALT-symbol'] |
|
667 |
+ .setVisible(abs(delta_alt) > 100); |
|
668 |
+ me.screenElements['SelectedALT-bg'] |
|
669 |
+ .setVisible(abs(delta_alt) > 100); |
|
670 |
+ me.screenElements['SelectedALT-text'] |
|
671 |
+ .setText(sprintf("%i", selected_alt)) |
|
666 | 672 |
.setVisible(abs(delta_alt) > 100); |
667 |
- me.screenElements['SelectedAlt-bug'] |
|
673 |
+ me.screenElements['SelectedALT-bug'] |
|
668 | 674 |
.setTranslation(0, delta_alt * 0.567); # 170/300 = 0.567 |
669 |
- me.screenElements['SelectedAlt-text'] |
|
670 |
- .setText(sprintf("%i", selected_alt)); |
|
671 | 675 |
}, |
672 | 676 |
#}}} |
673 | 677 |
|
... | ... |
@@ -7131,12 +7131,12 @@ |
7131 | 7131 |
</g> |
7132 | 7132 |
<rect |
7133 | 7133 |
style="display:none;opacity:1;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
7134 |
- id="SelectedAlt-meters" |
|
7134 |
+ id="SelectedALT-meters" |
|
7135 | 7135 |
width="105" |
7136 | 7136 |
height="25" |
7137 | 7137 |
x="703.5" |
7138 | 7138 |
y="57.5" |
7139 |
- inkscape:label="SelectedAlt-meters" /> |
|
7139 |
+ inkscape:label="SelectedALT-meters" /> |
|
7140 | 7140 |
<rect |
7141 | 7141 |
style="display:none;opacity:1;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:1.01030481;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
7142 | 7142 |
id="SelectedSpeed" |
... | ... |
@@ -7336,43 +7336,39 @@ |
7336 | 7336 |
inkscape:label="SelectedALT" |
7337 | 7337 |
style="display:inline"> |
7338 | 7338 |
<path |
7339 |
- inkscape:label="SelectedAlt-bug" |
|
7339 |
+ inkscape:label="SelectedALT-bug" |
|
7340 | 7340 |
sodipodi:nodetypes="cccccccc" |
7341 | 7341 |
inkscape:connector-curvature="0" |
7342 |
- id="SelectedAlt-bug" |
|
7342 |
+ id="SelectedALT-bug" |
|
7343 | 7343 |
d="m 702.995,273.07678 13.50494,0.0625 10e-6,4.92322 -9.00001,6.4375 9.00001,6.5625 -10e-6,4.12239 -13.50494,-0.0625 z" |
7344 | 7344 |
style="fill:#00ffff;stroke:none;stroke-width:1.00699997;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> |
7345 |
- <g |
|
7346 |
- id="SelectedAlt-top" |
|
7347 |
- inkscape:label="SelectedAlt-top"> |
|
7348 |
- <rect |
|
7349 |
- inkscape:label="SelectedAlt-bg" |
|
7350 |
- y="82.54493" |
|
7351 |
- x="703.54492" |
|
7352 |
- height="30.910122" |
|
7353 |
- width="104.91015" |
|
7354 |
- id="SelectedAlt-bg" |
|
7355 |
- style="display:inline;opacity:1;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:1.08987784;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> |
|
7356 |
- <path |
|
7357 |
- inkscape:label="selectedalt-symbol" |
|
7358 |
- sodipodi:nodetypes="cccccccc" |
|
7359 |
- inkscape:connector-curvature="0" |
|
7360 |
- id="selectedalt-symbol" |
|
7361 |
- d="m 708.11228,86.945933 13.50494,0.0625 10e-6,4.92322 -9.00001,6.4375 9.00001,6.562507 -10e-6,4.12239 -13.50494,-0.0625 z" |
|
7362 |
- style="display:inline;fill:#00ffff;stroke:none;stroke-width:1.00699997;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> |
|
7363 |
- <text |
|
7364 |
- inkscape:label="SelectedAlt-text" |
|
7365 |
- id="SelectedAlt-text" |
|
7345 |
+ <rect |
|
7346 |
+ inkscape:label="SelectedALT-bg" |
|
7347 |
+ y="82.54493" |
|
7348 |
+ x="703.54492" |
|
7349 |
+ height="30.910122" |
|
7350 |
+ width="104.91015" |
|
7351 |
+ id="SelectedALT-bg" |
|
7352 |
+ style="display:inline;opacity:1;fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:1.08987784;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> |
|
7353 |
+ <text |
|
7354 |
+ inkscape:label="SelectedALT-text" |
|
7355 |
+ id="SelectedALT-text" |
|
7356 |
+ y="106.73632" |
|
7357 |
+ x="725.75" |
|
7358 |
+ style="font-style:normal;font-weight:normal;font-size:24px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" |
|
7359 |
+ xml:space="preserve"><tspan |
|
7360 |
+ style="fill:#ffffff" |
|
7366 | 7361 |
y="106.73632" |
7367 | 7362 |
x="725.75" |
7368 |
- style="font-style:normal;font-weight:normal;font-size:24px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" |
|
7369 |
- xml:space="preserve"><tspan |
|
7370 |
- style="fill:#ffffff" |
|
7371 |
- y="106.73632" |
|
7372 |
- x="725.75" |
|
7373 |
- id="tspan6644" |
|
7374 |
- sodipodi:role="line">99999</tspan></text> |
|
7375 |
- </g> |
|
7363 |
+ id="tspan6644" |
|
7364 |
+ sodipodi:role="line">99999</tspan></text> |
|
7365 |
+ <path |
|
7366 |
+ style="display:inline;fill:#00ffff;stroke:none;stroke-width:1.00699997;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" |
|
7367 |
+ d="m 708.11228,86.945933 13.50494,0.0625 10e-6,4.92322 -9.00001,6.4375 9.00001,6.562507 -10e-6,4.12239 -13.50494,-0.0625 z" |
|
7368 |
+ id="SelectedALT-symbol" |
|
7369 |
+ inkscape:connector-curvature="0" |
|
7370 |
+ sodipodi:nodetypes="cccccccc" |
|
7371 |
+ inkscape:label="SelectedALT-symbol" /> |
|
7376 | 7372 |
</g> |
7377 | 7373 |
</g> |
7378 | 7374 |
<g |