... | ... |
@@ -34,7 +34,8 @@ var displayClass = { |
34 | 34 |
else { |
35 | 35 |
me.progress.hide(); |
36 | 36 |
me.screen.show(); |
37 |
- me.loadGroup({ show : [ |
|
37 |
+ me.loadGroup({ |
|
38 |
+ show : [ |
|
38 | 39 |
'SoftKeysTexts', |
39 | 40 |
'COMM', |
40 | 41 |
'NAV', |
... | ... |
@@ -42,8 +43,12 @@ var displayClass = { |
42 | 43 |
'FlightInstruments', |
43 | 44 |
'Horizon', |
44 | 45 |
'bankPointer', |
45 |
- ]}); |
|
46 |
+ 'VSI', |
|
47 |
+ ], |
|
48 |
+ text: 'VSIText', |
|
49 |
+ }); |
|
46 | 50 |
me.updateAI(getprop('/orientation/roll-deg'),getprop('orientation/pitch-deg')); |
51 |
+ me.updateVSI(getprop('/instrumentation/vertical-speed-indicator/indicated-speed-fpm')); |
|
47 | 52 |
me.progress.removeAllChildren(); |
48 | 53 |
me.progress = nil; |
49 | 54 |
me.showInitProgress = nil; |
... | ... |
@@ -96,6 +101,16 @@ var displayClass = { |
96 | 101 |
else |
97 | 102 |
print('no defined clip for ' ~ e); |
98 | 103 |
} |
104 |
+ elsif (t == 'text') { |
|
105 |
+ if (contains(me.texts, e)) { |
|
106 |
+ if (contains(me.texts[e], 'alignment')) |
|
107 |
+ me.screenElements[e].setAlignment(me.texts[e].alignment); |
|
108 |
+ if (contains(me.texts[e], 'default')) |
|
109 |
+ me.screenElements[e].setText(me.texts[e].default); |
|
110 |
+ } |
|
111 |
+ else |
|
112 |
+ print('no alignment for ' ~ e); |
|
113 |
+ } |
|
99 | 114 |
else |
100 | 115 |
print('unknown method ' ~ t); |
101 | 116 |
}; |
... | ... |
@@ -119,6 +134,12 @@ var displayClass = { |
119 | 134 |
PitchScale : "rect(70,664,370,256)", |
120 | 135 |
}, |
121 | 136 |
|
137 |
+ texts : { |
|
138 |
+ VSIText : { |
|
139 |
+ alignment: "right-bottom", default : num('0'), |
|
140 |
+ }, |
|
141 |
+ }, |
|
142 |
+ |
|
122 | 143 |
updateAI: func(roll,pitch){ |
123 | 144 |
if (pitch > 80) |
124 | 145 |
pitch = 80; |
... | ... |
@@ -131,4 +152,16 @@ var displayClass = { |
131 | 152 |
.setRotation(-roll * D2R); |
132 | 153 |
settimer(func me.updateAI(getprop('/orientation/roll-deg'),getprop('orientation/pitch-deg')), 0.1); |
133 | 154 |
}, |
155 |
+ |
|
156 |
+ updateVSI: func (vsi) { |
|
157 |
+ me.screenElements.VSIText |
|
158 |
+ .setText(num(math.round(vsi, 10))); |
|
159 |
+ if (vsi > 4500) |
|
160 |
+ vsi = 4500; |
|
161 |
+ elsif (vsi < -4500) |
|
162 |
+ vsi = -4500; |
|
163 |
+ me.screenElements.VSI |
|
164 |
+ .setTranslation(0, vsi * -0.03465); |
|
165 |
+ settimer(func me.updateVSI(getprop('/instrumentation/vertical-speed-indicator/indicated-speed-fpm')), 0.1); |
|
166 |
+ }, |
|
134 | 167 |
}; |
... | ... |
@@ -4381,10 +4381,10 @@ |
4381 | 4381 |
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';text-align:end;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" |
4382 | 4382 |
xml:space="preserve"><tspan |
4383 | 4383 |
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17.5px;line-height:125%;font-family:'Liberation Sans';text-align:end;writing-mode:lr-tb;text-anchor:end" |
4384 |
- y="290.40256" |
|
4384 |
+ y="293.71161" |
|
4385 | 4385 |
x="877.40613" |
4386 | 4386 |
id="tspan6415" |
4387 |
- sodipodi:role="line">-0000</tspan></text> |
|
4387 |
+ sodipodi:role="line" /></text> |
|
4388 | 4388 |
</g> |
4389 | 4389 |
<path |
4390 | 4390 |
style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" |