commit initial
|
1 |
var displayClass = { |
2 |
new: func(node, role) { |
|
3 |
var m = { parents: [ displayClass ] }; |
|
4 |
|
|
5 |
m.display = canvas.new({ |
|
6 |
"name" : role, |
|
7 |
"size" : [1024, 768], |
|
8 |
"view" : [1024, 768], |
|
9 |
"mipmapping": 1 |
|
10 |
}); |
|
11 |
m.display.addPlacement({ |
|
12 |
"node": "Screen", |
|
13 |
"parent": role |
|
14 |
}); |
|
15 |
m.display.setColorBackground(0,0,0); |
|
16 |
m.role = role; |
|
écriture du wrapper pour le ...
|
17 |
m.screenElements = {}; |
commit initial
|
18 | |
19 |
return m; |
|
20 |
}, |
|
21 | ||
22 |
loadsvg : func () { |
|
23 |
me.screen = me.display.createGroup(); |
|
24 |
me.screen.hide(); |
|
25 |
canvas.parsesvg(me.screen, "Aircraft/Instruments-3d/zkv1000/Systems/screen.svg"); |
|
26 |
}, |
|
27 | ||
28 |
_showInitProgress : func (p,t) { |
|
29 |
p.setText(t); |
|
30 |
if (zkv.getNode(me.role ~ 'init').getValue() != 0) { |
|
31 |
if (size(t) >= 10) t = ''; |
|
32 |
settimer(func { me._showInitProgress(p, t ~ '.'); }, 0.1); |
|
33 |
} |
|
34 |
else { |
|
35 |
me.progress.hide(); |
|
36 |
me.screen.show(); |
|
animation VSI
|
37 |
me.loadGroup({ |
38 |
show : [ |
|
commit initial
|
39 |
'SoftKeysTexts', |
40 |
'COMM', |
|
41 |
'NAV', |
|
42 |
'XPDR-TIME', |
|
AI disponible
|
43 |
'FlightInstruments', |
44 |
'Horizon', |
|
AI disponible, avec bankPoin...
|
45 |
'bankPointer', |
animation VSI
|
46 |
'VSI', |
animation HSI
|
47 |
'Rose', |
48 |
], |
|
49 |
hide : [ |
|
NAV disponible (hors CDI)
|
50 |
'CDI', |
animation HSI
|
51 |
'NAV1-pointer', |
52 |
'NAV2-pointer', |
|
53 |
'GPS-pointer', |
|
54 |
'Bearing1', |
|
55 |
'Bearing2', |
|
animation VSI
|
56 |
], |
animation IAS
|
57 |
text: [ |
58 |
'VSIText', |
|
animation ALT
|
59 |
'Speed110', |
animation HSI
|
60 |
'Alt11100', |
61 |
'HDG-text', |
|
NAV disponible (hors CDI)
|
62 |
'nav1-standby-freq', 'nav1-selected-freq', 'nav1-id', |
63 |
'nav2-standby-freq', 'nav2-selected-freq', 'nav2-id', |
|
64 |
'nav-freq-switch', |
|
animation IAS
|
65 |
], |
66 |
clip: [ |
|
67 |
'SpeedLint1', |
|
animation ALT
|
68 |
'SpeedTape', |
69 |
'LintAlt', |
|
70 |
'AltLint00011' |
|
animation IAS
|
71 |
], |
animation VSI
|
72 |
}); |
animation IAS
|
73 | |
animation ALT
|
74 |
var AltBigAltSmall = [ 'AltBigC', 'AltSmallC' ]; |
75 |
for (var place = 1; place <= 6; place +=1) { |
|
76 |
append(AltBigAltSmall, |
|
77 |
'AltBigU' ~ place, |
|
78 |
'AltSmallU' ~ place, |
|
79 |
'AltBigD' ~ place, |
|
80 |
'AltSmallD' ~ place |
|
81 |
); |
|
82 |
} |
|
83 |
me.loadGroup({text: AltBigAltSmall}); |
|
84 | ||
AI disponible, avec bankPoin...
|
85 |
me.updateAI(getprop('/orientation/roll-deg'),getprop('orientation/pitch-deg')); |
animation VSI
|
86 |
me.updateVSI(getprop('/instrumentation/vertical-speed-indicator/indicated-speed-fpm')); |
animation IAS
|
87 |
me.updateIAS(getprop('/velocities/airspeed-kt')); |
animation ALT
|
88 |
me.updateALT(getprop('instrumentation/altimeter/indicated-altitude-ft')); |
animation HSI
|
89 |
me.updateHSI(getprop('orientation/heading-deg')); |
NAV disponible (hors CDI)
|
90 |
me.updateNAV({refresh:1, auto:1}); |
commit initial
|
91 |
me.progress.removeAllChildren(); |
92 |
me.progress = nil; |
|
93 |
me.showInitProgress = nil; |
|
94 |
me._showInitProgress = nil; |
|
95 |
zkv.removeChild(me.role ~ 'init'); |
|
96 |
} |
|
97 |
}, |
|
98 | ||
99 |
showInitProgress : func (role) { |
|
100 |
me.progress = me.display.createGroup(); |
|
101 |
me.progress.show(); |
|
102 |
me.progress.createChild("text", role ~ " title") |
|
103 |
.setTranslation(512, 384) |
|
104 |
.setAlignment("center-center") |
|
105 |
.setFont("LiberationFonts/LiberationSans-Italic.ttf") |
|
106 |
.setFontSize(64, 1) |
|
107 |
.setColor(1,1,1) |
|
108 |
.setText("ZKV1000 " ~ role ~ " init"); |
|
109 | ||
110 |
zkv.getNode(role ~ 'init',1).setIntValue(1); |
|
111 | ||
112 |
me._showInitProgress(me.progress.createChild("text", role ~ "progress") |
|
113 |
.setTranslation(512, 484) |
|
114 |
.setAlignment("center-center") |
|
115 |
.setFont("LiberationFonts/LiberationSans-Bold.ttf") |
|
116 |
.setFontSize(128, 1) |
|
117 |
.setColor(1,0,0), '.'); |
|
118 |
}, |
|
119 | ||
écriture du wrapper pour le ...
|
120 |
loadGroup : func (h) { |
121 |
if (typeof(h) != 'hash') { |
|
122 |
msg_dbg(sprintf("%s need a hash, but get a %s from %s", |
|
123 |
caller(0)[0], |
|
124 |
typeof(h), |
|
125 |
caller(1)[0])); |
|
126 |
return; |
|
commit initial
|
127 |
} |
écriture du wrapper pour le ...
|
128 |
var setMethod = func (e, t) { |
129 |
if (t == 'hide') |
|
130 |
me.screenElements[e].hide(); |
|
131 |
elsif (t == 'show') |
|
132 |
me.screenElements[e].show(); |
|
AI disponible
|
133 |
elsif (t == 'rot' or t == 'trans') { |
134 |
if (! contains(me.screenElements[e], t)) |
|
135 |
me.screenElements[e][t] = me.screenElements[e].createTransform(); |
|
136 |
} |
|
137 |
elsif (t == 'clip') { |
|
138 |
if (contains(me.clips, e)) |
|
139 |
me.screenElements[e].set("clip", me.clips[e]); |
|
140 |
else |
|
141 |
print('no defined clip for ' ~ e); |
|
142 |
} |
|
animation VSI
|
143 |
elsif (t == 'text') { |
144 |
if (contains(me.texts, e)) { |
|
145 |
if (contains(me.texts[e], 'alignment')) |
|
146 |
me.screenElements[e].setAlignment(me.texts[e].alignment); |
|
147 |
if (contains(me.texts[e], 'default')) |
|
148 |
me.screenElements[e].setText(me.texts[e].default); |
|
NAV disponible (hors CDI)
|
149 |
if (contains(me.texts[e], 'color')) |
150 |
me.screenElements[e].setColor(me.texts[e].color); |
|
animation VSI
|
151 |
} |
clean pre-merge
|
152 |
# else |
153 |
# print('no text format for ' ~ e); |
|
animation VSI
|
154 |
} |
commit initial
|
155 |
else |
écriture du wrapper pour le ...
|
156 |
print('unknown method ' ~ t); |
157 |
}; |
|
158 |
foreach (var todo; keys(h)) { |
|
159 |
if (typeof(h[todo]) != 'vector') h[todo] = [ h[todo] ]; |
|
160 |
foreach (var id; h[todo]) { |
|
161 |
if (! contains(me.screenElements, id)) { |
|
162 |
me.screenElements[id] = me.screen.getElementById(id); |
|
163 |
if (me.screenElements[id] != nil) |
|
164 |
setMethod(id, todo); |
|
165 |
else |
|
166 |
print('SVG ID ' ~ id ~ ' not found'); |
|
167 |
} |
|
168 |
else |
|
169 |
setMethod(id, todo); |
|
170 |
} |
|
commit initial
|
171 |
} |
172 |
}, |
|
AI disponible
|
173 | |
174 |
clips : { |
|
clean pre-merge
|
175 |
PitchScale : "rect(70,664,370,256)", |
176 |
SpeedLint1 : "rect(252,226,318,204)", |
|
177 |
SpeedTape : "rect(115,239,455,156)", |
|
178 |
LintAlt : "rect(115,808,455,704)", |
|
animation ALT
|
179 |
AltLint00011 : "rect(252,804,318,771)", |
AI disponible
|
180 |
}, |
181 | ||
animation VSI
|
182 |
texts : { |
183 |
VSIText : { |
|
184 |
alignment: "right-bottom", default : num('0'), |
|
185 |
}, |
|
animation IAS
|
186 |
Speed110 : { |
NAV disponible (hors CDI)
|
187 |
alignment : 'left-bottom' |
animation IAS
|
188 |
}, |
animation ALT (2)
|
189 |
Alt11100 : { |
NAV disponible (hors CDI)
|
190 |
alignment:'left-bottom' |
animation ALT (2)
|
191 |
}, |
clean pre-merge
|
192 |
"HDG-text" : { |
193 |
default: '---°' |
|
194 |
}, |
|
NAV disponible (hors CDI)
|
195 |
'nav1-standby-freq' : { |
196 |
color: [0, 1, 1], |
|
197 |
}, |
|
198 |
'nav1-id' : { |
|
199 |
default: '' |
|
200 |
}, |
|
201 |
'nav2-id' : { |
|
202 |
default: '' |
|
203 |
}, |
|
animation VSI
|
204 |
}, |
205 | ||
AI disponible, avec bankPoin...
|
206 |
updateAI: func(roll,pitch){ |
AI disponible
|
207 |
if (pitch > 80) |
208 |
pitch = 80; |
|
clean pre-merge
|
209 |
elsif (pitch < -80) |
AI disponible
|
210 |
pitch = -80; |
211 |
me.screenElements.Horizon |
|
212 |
.setRotation(-roll * D2R) |
|
213 |
.setTranslation(0, pitch * 6.8571428); |
|
AI disponible, avec bankPoin...
|
214 |
me.screenElements.bankPointer |
215 |
.setRotation(-roll * D2R); |
|
216 |
settimer(func me.updateAI(getprop('/orientation/roll-deg'),getprop('orientation/pitch-deg')), 0.1); |
|
AI disponible
|
217 |
}, |
animation VSI
|
218 | |
219 |
updateVSI: func (vsi) { |
|
220 |
me.screenElements.VSIText |
|
221 |
.setText(num(math.round(vsi, 10))); |
|
222 |
if (vsi > 4500) |
|
223 |
vsi = 4500; |
|
224 |
elsif (vsi < -4500) |
|
225 |
vsi = -4500; |
|
226 |
me.screenElements.VSI |
|
227 |
.setTranslation(0, vsi * -0.03465); |
|
228 |
settimer(func me.updateVSI(getprop('/instrumentation/vertical-speed-indicator/indicated-speed-fpm')), 0.1); |
|
229 |
}, |
|
animation IAS
|
230 | |
231 |
updateIAS: func (ias) { |
|
232 |
if (ias >= 10) |
|
233 |
me.screenElements.Speed110 |
|
234 |
.setText(sprintf("% 2u",num(math.floor(ias/10)))); |
|
235 |
else |
|
236 |
me.screenElements.Speed110 |
|
237 |
.setText(''); |
|
238 |
me.screenElements.SpeedLint1 |
|
239 |
.setTranslation(0,(math.mod(ias,10) + (ias >= 10)*10) * 36); |
|
240 |
me.screenElements.SpeedTape |
|
241 |
.setTranslation(0,ias * 5.711); |
|
242 |
settimer(func me.updateIAS(getprop('/velocities/airspeed-kt')), 0.1); |
|
243 |
}, |
|
animation ALT
|
244 | |
245 |
updateALT: func (alt) { |
|
246 |
if (alt < 0) |
|
247 |
me.screenElements.Alt11100 |
|
248 |
.setText(sprintf("% 3i",math.ceil(alt/100))); |
|
249 |
elsif (alt < 100) |
|
250 |
me.screenElements.Alt11100 |
|
251 |
.setText(''); |
|
252 |
else |
|
253 |
me.screenElements.Alt11100 |
|
254 |
.setText(sprintf("% 3i",math.floor(alt/100))); |
|
255 |
me.screenElements.AltLint00011 |
|
256 |
.setTranslation(0,math.fmod(alt,100) * 1.24); |
|
257 | ||
258 |
# From Farmin/G1000 http://wiki.flightgear.org/Project_Farmin/FG1000 |
|
259 |
if (alt> -1000 and alt< 1000000) { |
|
260 |
var Offset10 = 0; |
|
261 |
var Offset100 = 0; |
|
262 |
var Offset1000 = 0; |
|
263 |
if (alt< 0) { |
|
264 |
var Ne = 1; |
|
265 |
var alt= -alt; |
|
266 |
} |
|
267 |
else |
|
268 |
var Ne = 0; |
|
269 | ||
270 |
var Alt10 = math.mod(alt,100); |
|
271 |
var Alt100 = int(math.mod(alt/100,10)); |
|
272 |
var Alt1000 = int(math.mod(alt/1000,10)); |
|
273 |
var Alt10000 = int(math.mod(alt/10000,10)); |
|
274 |
var Alt20 = math.mod(Alt10,20)/20; |
|
275 |
if (Alt10 >= 80) |
|
276 |
var Alt100 += Alt20; |
|
277 | ||
278 |
if (Alt10 >= 80 and Alt100 >= 9) |
|
279 |
var Alt1000 += Alt20; |
|
280 | ||
281 |
if (Alt10 >= 80 and Alt100 >= 9 and Alt1000 >= 9) |
|
282 |
var Alt10000 += Alt20; |
|
283 | ||
284 |
if (alt> 100) |
|
285 |
var Offset10 = 100; |
|
286 | ||
287 |
if (alt> 1000) |
|
288 |
var Offset100 = 10; |
|
289 | ||
290 |
if (alt> 10000) |
|
291 |
var Offset1000 = 10; |
|
292 | ||
293 |
if (!Ne) { |
|
294 |
me.screenElements.LintAlt.setTranslation(0,(math.mod(alt,100))*0.57375); |
|
295 |
var altCentral = (int(alt/100)*100); |
|
296 |
} |
|
297 |
elsif (Ne) { |
|
298 |
me.screenElements.LintAlt.setTranslation(0,(math.mod(alt,100))*-0.57375); |
|
299 |
var altCentral = -(int(alt/100)*100); |
|
300 |
} |
|
301 |
me.screenElements["AltBigC"].setText(""); |
|
302 |
me.screenElements["AltSmallC"].setText(""); |
|
303 |
for (var place = 1; place <= 6; place += 1) { |
|
304 |
var altUP = altCentral + (place*100); |
|
305 |
var offset = -30.078; |
|
306 |
if (altUP < 0) { |
|
307 |
var altUP = -altUP; |
|
308 |
var prefix = "-"; |
|
309 |
var offset += 15.039; |
|
310 |
} |
|
311 |
else |
|
312 |
var prefix = ""; |
|
313 | ||
314 |
if (altUP == 0) { |
|
315 |
var AltBigUP = ""; |
|
316 |
var AltSmallUP = "0"; |
|
317 | ||
318 |
} |
|
319 |
elsif (math.mod(altUP,500) == 0 and altUP != 0) { |
|
320 |
var AltBigUP = sprintf(prefix~"%1d", altUP); |
|
321 |
var AltSmallUP = ""; |
|
322 |
} |
|
323 |
elsif (altUP < 1000 and (math.mod(altUP,500))) { |
|
324 |
var AltBigUP = ""; |
|
325 |
var AltSmallUP = sprintf(prefix~"%1d", int(math.mod(altUP,1000))); |
|
326 |
var offset = -30.078; |
|
327 |
} |
|
328 |
elsif ((altUP < 10000) and (altUP >= 1000) and (math.mod(altUP,500))) { |
|
329 |
var AltBigUP = sprintf(prefix~"%1d", int(altUP/1000)); |
|
330 |
var AltSmallUP = sprintf("%1d", int(math.mod(altUP,1000))); |
|
331 |
var offset += 15.039; |
|
332 |
} |
|
333 |
else { |
|
334 |
var AltBigUP = sprintf(prefix~"%1d", int(altUP/1000)); |
|
335 |
var mod = int(math.mod(altUP,1000)); |
|
336 |
var AltSmallUP = sprintf("%1d", mod); |
|
337 |
var offset += 30.078; |
|
338 |
} |
|
339 | ||
340 |
me.screenElements["AltBigU"~place].setText(AltBigUP); |
|
341 |
me.screenElements["AltSmallU"~place].setText(AltSmallUP); |
|
342 |
me.screenElements["AltSmallU"~place].setTranslation(offset,0); |
|
343 |
var altDOWN = altCentral - (place*100); |
|
344 |
var offset = -30.078; |
|
345 |
if (altDOWN < 0) { |
|
346 |
var altDOWN = -altDOWN; |
|
347 |
var prefix = "-"; |
|
348 |
var offset += 15.039; |
|
349 |
} |
|
350 |
else |
|
351 |
var prefix = ""; |
|
352 | ||
353 |
if (altDOWN == 0) { |
|
354 |
var AltBigDOWN = ""; |
|
355 |
var AltSmallDOWN = "0"; |
|
356 |
} |
|
357 |
elsif (math.mod(altDOWN,500) == 0 and altDOWN != 0) { |
|
358 |
var AltBigDOWN = sprintf(prefix~"%1d", altDOWN); |
|
359 |
var AltSmallDOWN = ""; |
|
360 |
} |
|
361 |
elsif (altDOWN < 1000 and (math.mod(altDOWN,500))) { |
|
362 |
var AltBigDOWN = ""; |
|
363 |
var AltSmallDOWN = sprintf(prefix~"%1d", int(math.mod(altDOWN,1000))); |
|
364 |
var offset = -30.078; |
|
365 |
} |
|
366 |
elsif ((altDOWN < 10000) and (altDOWN >= 1000) and (math.mod(altDOWN,500))) { |
|
367 |
var AltBigDOWN = sprintf(prefix~"%1d", int(altDOWN/1000)); |
|
368 |
var AltSmallDOWN = sprintf("%1d", int(math.mod(altDOWN,1000))); |
|
369 |
var offset += 15.039; |
|
370 |
} |
|
371 |
else { |
|
372 |
var AltBigDOWN = sprintf(prefix~"%1d", int(altDOWN/1000)); |
|
373 |
var mod = int(math.mod(altDOWN,1000)); |
|
374 |
var AltSmallDOWN = sprintf("%1d", mod); |
|
375 |
var offset += 30.078; |
|
376 |
} |
|
377 |
me.screenElements["AltBigD"~place].setText(AltBigDOWN); |
|
378 |
me.screenElements["AltSmallD"~place].setText(AltSmallDOWN); |
|
379 |
me.screenElements["AltSmallD"~place].setTranslation(offset,0); |
|
380 |
} |
|
381 |
} |
|
382 |
settimer(func me.updateALT(getprop('instrumentation/altimeter/indicated-altitude-ft')), 0.2); |
|
383 |
}, |
|
animation HSI
|
384 | |
385 |
updateHSI : func (hdg) { |
|
386 |
me.screenElements.Rose |
|
387 |
.setRotation(-hdg * D2R); |
|
388 |
me.screenElements['HDG-text'] |
|
389 |
.setText(sprintf("%03u°", hdg)); |
|
390 |
settimer(func me.updateHSI(getprop('orientation/heading-deg')), 0.1); |
|
391 |
}, |
|
NAV disponible (hors CDI)
|
392 | |
393 |
updateNAV : func { |
|
394 |
# made active via menu |
|
395 |
if (contains(arg[0], "active")) { |
|
396 |
if (arg[0]['active'] == 'none') { |
|
397 |
me.screenElements['nav1-id'] |
|
398 |
.setColor(1,1,1); |
|
399 |
me.screenElements['nav1-selected-freq'] |
|
400 |
.setColor(1,1,1); |
|
401 |
me.screenElements['nav2-id'] |
|
402 |
.setColor(1,1,1); |
|
403 |
me.screenElements['nav2-selected-freq'] |
|
404 |
.setColor(1,1,1); |
|
405 |
me.screenElements['NAV1-pointer'] |
|
406 |
.hide(); |
|
407 |
me.screenElements['NAV2-pointer'] |
|
408 |
.hide(); |
|
409 |
} |
|
410 |
else { |
|
411 |
var inactive = (arg[0]['active'] == 1) + 1; |
|
412 |
me.screenElements['nav' ~ arg[0]['active'] ~ '-id'] |
|
413 |
.setColor(0,1,0); |
|
414 |
me.screenElements['nav' ~ arg[0]['active'] ~ '-selected-freq'] |
|
415 |
.setColor(0,1,0); |
|
416 |
me.screenElements['NAV' ~ arg[0]['active'] ~ '-pointer'] |
|
417 |
.show(); |
|
418 |
# me.screenElements['HDI'] |
|
419 |
# .setRotation(); |
|
420 |
me.screenElements['nav' ~ inactive ~ '-id'] |
|
421 |
.setColor(1,1,1); |
|
422 |
me.screenElements['nav' ~ inactive ~ '-selected-freq'] |
|
423 |
.setColor(1,1,1); |
|
424 |
# me.screenElements['NAV' ~ inactive ~ '-pointer'] |
|
425 |
# .hide(); |
|
426 |
# foreach (var e; [ 'FROM', 'TO', 'CDI' ]) |
|
427 |
# me.screenElements['NAV' ~ inactive ~ '-' ~ e] |
|
428 |
# .hide(); |
|
429 |
} |
|
430 |
} |
|
431 |
if (contains(arg[0], 'tune')) { |
|
Correction swap NAV tuning
|
432 |
var n = getprop('/instrumentation/zkv1000/radios/nav-tune'); |
433 |
# n = 0 -> NAV1 |
|
434 |
# n = 1 -> NAV2 |
|
NAV disponible (hors CDI)
|
435 |
me.screenElements['nav-freq-switch'] |
Correction swap NAV tuning
|
436 |
.setTranslation(0, n * 25); |
437 |
me.screenElements['nav' ~ (n + 1) ~ '-standby-freq'] |
|
NAV disponible (hors CDI)
|
438 |
.setColor(0,1,1); |
Correction swap NAV tuning
|
439 |
me.screenElements['nav' ~ ((n == 0) + 1) ~ '-standby-freq'] |
NAV disponible (hors CDI)
|
440 |
.setColor(1,1,1); |
441 |
} |
|
442 |
if (contains(arg[0], 'nav-id')) { |
|
Correction swap NAV tuning
|
443 |
# TODO: récupérer la valeur via les paramètres transmis du listener |
NAV disponible (hors CDI)
|
444 |
var navid = getprop('/instrumentation/nav[' ~ (arg[0]['nav-id'] - 1) ~ ']/nav-id'); |
445 |
if (navid == nil) |
|
446 |
navid = ''; |
|
447 |
me.screenElements["nav" ~ arg[0]['nav-id'] ~ "-id"] |
|
448 |
.setText(navid); # veut pas exister au début... |
|
449 |
} |
|
450 |
if (contains(arg[0], 'refresh')) { |
|
Correction swap NAV tuning
|
451 |
# rafraichi une seule ligne NAV1 ou NAV2 |
NAV disponible (hors CDI)
|
452 |
me.screenElements['nav' ~ arg[0].refresh ~ '-selected-freq'] |
453 |
.setText(getprop('/instrumentation/nav[' ~ (arg[0].refresh - 1) ~ ']/frequencies/selected-mhz-fmt')); |
|
454 |
me.screenElements['nav' ~ arg[0].refresh ~ '-standby-freq'] |
|
455 |
.setText(getprop('/instrumentation/nav[' ~ (arg[0].refresh - 1) ~ ']/frequencies/standby-mhz-fmt')); |
|
456 |
} |
|
457 |
if (contains(arg[0], 'set')) { |
|
Correction swap NAV tuning
|
458 |
# positionne la valeur modifiée, les listeners "trigguent" en permanence ces propriétés, donc exit |
NAV disponible (hors CDI)
|
459 |
var n = getprop('/instrumentation/zkv1000/radios/nav-tune'); |
460 |
me.screenElements['nav' ~ (n + 1) ~ '-standby-freq'] |
|
461 |
.setText(getprop('/instrumentation/nav[' ~ n ~ ']/frequencies/standby-mhz-fmt')); |
|
462 |
} |
|
463 |
if (contains(arg[0], 'auto')) { |
|
Correction swap NAV tuning
|
464 |
# pour rafraichir automagiquement, toutes les deux secondes un refresh pour un NAV |
NAV disponible (hors CDI)
|
465 |
me.updateNAV({refresh: 1}); |
466 |
settimer(func me.updateNAV({refresh: 2}), 1); |
|
467 |
settimer(func me.updateNAV({auto:1}), 2); |
|
468 |
} |
|
469 |
}, |
|
commit initial
|
470 |
}; |