zkv1000 / Nasal / display.nas /
Newer Older
482 lines | 18.39kb
commit initial
Sébastien MARQUE authored on 2017-03-07
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 ...
Sébastien MARQUE authored on 2017-03-10
17
        m.screenElements = {};
commit initial
Sébastien MARQUE authored on 2017-03-07
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();
séparation configuration PFD...
Sébastien MARQUE authored on 2017-03-12
37
            var groups = {
animation VSI
Sébastien MARQUE authored on 2017-03-10
38
                show : [
commit initial
Sébastien MARQUE authored on 2017-03-07
39
                    'SoftKeysTexts', 
40
                    'COMM', 
41
                    'NAV', 
séparation configuration PFD...
Sébastien MARQUE authored on 2017-03-12
42
                ],
43
                hide : [ ],
44
                text: [
45
                    'nav1-standby-freq', 'nav1-selected-freq', 'nav1-id',
46
                    'nav2-standby-freq', 'nav2-selected-freq', 'nav2-id',
47
                    'nav-freq-switch',
48
                ],
49
                clip: [ ],
50
            };
51
            if (me.role == 'PFD') {
52
                append(groups.show,
commit initial
Sébastien MARQUE authored on 2017-03-07
53
                    'XPDR-TIME', 
AI disponible
Sébastien MARQUE authored on 2017-03-10
54
                    'FlightInstruments',
55
                    'Horizon',
AI disponible, avec bankPoin...
Sébastien MARQUE authored on 2017-03-10
56
                    'bankPointer',
animation VSI
Sébastien MARQUE authored on 2017-03-10
57
                    'VSI',
animation HSI
Sébastien MARQUE authored on 2017-03-11
58
                    'Rose',
séparation configuration PFD...
Sébastien MARQUE authored on 2017-03-12
59
                );
60
                append(groups.hide,
NAV disponible (hors CDI)
Sébastien MARQUE authored on 2017-03-11
61
                    'CDI',
animation HSI
Sébastien MARQUE authored on 2017-03-11
62
                    'NAV1-pointer',
63
                    'NAV2-pointer',
64
                    'GPS-pointer',
65
                    'Bearing1',
66
                    'Bearing2',
séparation configuration PFD...
Sébastien MARQUE authored on 2017-03-12
67
                );
68
                append(groups.clip,
animation IAS
Sébastien MARQUE authored on 2017-03-10
69
                    'SpeedLint1',
animation ALT
Sébastien MARQUE authored on 2017-03-11
70
                    'SpeedTape',
71
                    'LintAlt',
72
                    'AltLint00011'
73
                );
séparation configuration PFD...
Sébastien MARQUE authored on 2017-03-12
74
                append(groups.text,
75
                    'VSIText',
76
                    'Speed110',
77
                    'Alt11100',
78
                    'HDG-text',
79
                    'AltBigC', 'AltSmallC'
80
                );
81
                for (var place = 1; place <= 6; place +=1) {
82
                    append(groups.text,
83
                        'AltBigU' ~ place,
84
                        'AltSmallU' ~ place,
85
                        'AltBigD' ~ place,
86
                        'AltSmallD' ~ place
87
                    );
88
                }
animation ALT
Sébastien MARQUE authored on 2017-03-11
89
            }
séparation configuration PFD...
Sébastien MARQUE authored on 2017-03-12
90
            else
91
                append(groups.show, 'Header');
92

            
93
            me.loadGroup(groups);
animation ALT
Sébastien MARQUE authored on 2017-03-11
94

            
séparation configuration PFD...
Sébastien MARQUE authored on 2017-03-12
95
            if (me.role == 'PFD') {
96
                me.updateAI(getprop('/orientation/roll-deg'),getprop('orientation/pitch-deg'));
97
                me.updateVSI(getprop('/instrumentation/vertical-speed-indicator/indicated-speed-fpm'));
98
                me.updateIAS(getprop('/velocities/airspeed-kt'));
99
                me.updateALT(getprop('instrumentation/altimeter/indicated-altitude-ft'));
100
                me.updateHSI(getprop('orientation/heading-deg'));
101
            }
NAV disponible (hors CDI)
Sébastien MARQUE authored on 2017-03-11
102
            me.updateNAV({refresh:1, auto:1});
commit initial
Sébastien MARQUE authored on 2017-03-07
103
            me.progress.removeAllChildren();
104
            me.progress = nil;
105
            me.showInitProgress = nil;
106
            me._showInitProgress = nil;
107
            zkv.removeChild(me.role ~ 'init');
108
        }
109
    },
110

            
111
    showInitProgress : func (role) {
112
        me.progress = me.display.createGroup();
113
        me.progress.show();
114
        me.progress.createChild("text", role ~ " title")
115
            .setTranslation(512, 384)
116
            .setAlignment("center-center")
117
            .setFont("LiberationFonts/LiberationSans-Italic.ttf")
118
            .setFontSize(64, 1)
119
            .setColor(1,1,1)
120
            .setText("ZKV1000 " ~ role ~ " init");
121

            
122
        zkv.getNode(role ~ 'init',1).setIntValue(1);
123

            
124
        me._showInitProgress(me.progress.createChild("text", role ~ "progress")
125
            .setTranslation(512, 484)
126
            .setAlignment("center-center")
127
            .setFont("LiberationFonts/LiberationSans-Bold.ttf")
128
            .setFontSize(128, 1)
129
            .setColor(1,0,0), '.');
130
    },
131

            
écriture du wrapper pour le ...
Sébastien MARQUE authored on 2017-03-10
132
    loadGroup : func (h) {
133
        if (typeof(h) != 'hash') {
134
            msg_dbg(sprintf("%s need a hash, but get a %s from %s",
135
                    caller(0)[0],
136
                    typeof(h),
137
                    caller(1)[0]));
138
            return;
commit initial
Sébastien MARQUE authored on 2017-03-07
139
        }
écriture du wrapper pour le ...
Sébastien MARQUE authored on 2017-03-10
140
        var setMethod = func (e, t) {
141
            if (t == 'hide')
142
                me.screenElements[e].hide();
143
            elsif (t == 'show')
144
                me.screenElements[e].show();
AI disponible
Sébastien MARQUE authored on 2017-03-10
145
            elsif (t == 'rot' or t == 'trans') {
146
                if (! contains(me.screenElements[e], t))
147
                    me.screenElements[e][t] = me.screenElements[e].createTransform();
148
            }
149
            elsif (t == 'clip') {
150
                if (contains(me.clips, e))
151
                    me.screenElements[e].set("clip", me.clips[e]);
152
                else
153
                    print('no defined clip for ' ~ e);
154
            }
animation VSI
Sébastien MARQUE authored on 2017-03-10
155
            elsif (t == 'text') {
156
                if (contains(me.texts, e)) {
157
                    if (contains(me.texts[e], 'alignment'))
158
                        me.screenElements[e].setAlignment(me.texts[e].alignment);
159
                    if (contains(me.texts[e], 'default'))
160
                        me.screenElements[e].setText(me.texts[e].default);
NAV disponible (hors CDI)
Sébastien MARQUE authored on 2017-03-11
161
                    if (contains(me.texts[e], 'color'))
162
                        me.screenElements[e].setColor(me.texts[e].color);
animation VSI
Sébastien MARQUE authored on 2017-03-10
163
                }
clean pre-merge
Sébastien MARQUE authored on 2017-03-11
164
#                else
165
#                    print('no text format for ' ~ e);
animation VSI
Sébastien MARQUE authored on 2017-03-10
166
            }
commit initial
Sébastien MARQUE authored on 2017-03-07
167
            else
écriture du wrapper pour le ...
Sébastien MARQUE authored on 2017-03-10
168
                print('unknown method ' ~ t);
169
        };
170
        foreach (var todo; keys(h)) {
171
            if (typeof(h[todo]) != 'vector') h[todo] = [ h[todo] ];
172
            foreach (var id; h[todo]) {
173
                if (! contains(me.screenElements, id)) {
174
                    me.screenElements[id] = me.screen.getElementById(id);
175
                    if (me.screenElements[id] != nil)
176
                        setMethod(id, todo);
177
                    else
178
                        print('SVG ID ' ~ id ~ ' not found');
179
                }
180
                else
181
                    setMethod(id, todo);
182
            }
commit initial
Sébastien MARQUE authored on 2017-03-07
183
        }
184
    },
AI disponible
Sébastien MARQUE authored on 2017-03-10
185

            
186
    clips : {
clean pre-merge
Sébastien MARQUE authored on 2017-03-11
187
        PitchScale   : "rect(70,664,370,256)",
188
        SpeedLint1   : "rect(252,226,318,204)",
189
        SpeedTape    : "rect(115,239,455,156)",
190
        LintAlt      : "rect(115,808,455,704)",
animation ALT
Sébastien MARQUE authored on 2017-03-11
191
        AltLint00011 : "rect(252,804,318,771)",
AI disponible
Sébastien MARQUE authored on 2017-03-10
192
    },
193

            
animation VSI
Sébastien MARQUE authored on 2017-03-10
194
    texts : {
195
        VSIText : {
196
            alignment: "right-bottom", default : num('0'),
197
        },
animation IAS
Sébastien MARQUE authored on 2017-03-10
198
        Speed110 : {
NAV disponible (hors CDI)
Sébastien MARQUE authored on 2017-03-11
199
            alignment : 'left-bottom'
animation IAS
Sébastien MARQUE authored on 2017-03-10
200
        },
animation ALT (2)
Sébastien MARQUE authored on 2017-03-11
201
        Alt11100 : {
NAV disponible (hors CDI)
Sébastien MARQUE authored on 2017-03-11
202
            alignment:'left-bottom'
animation ALT (2)
Sébastien MARQUE authored on 2017-03-11
203
        },
clean pre-merge
Sébastien MARQUE authored on 2017-03-11
204
        "HDG-text" : {
205
            default: '---°'
206
        },
NAV disponible (hors CDI)
Sébastien MARQUE authored on 2017-03-11
207
        'nav1-standby-freq' : {
208
            color: [0, 1, 1],
209
        },
210
        'nav1-id' : {
211
            default: ''
212
        },
213
        'nav2-id' : {
214
            default: ''
215
        },
animation VSI
Sébastien MARQUE authored on 2017-03-10
216
    },
217

            
AI disponible, avec bankPoin...
Sébastien MARQUE authored on 2017-03-10
218
    updateAI: func(roll,pitch){
AI disponible
Sébastien MARQUE authored on 2017-03-10
219
        if (pitch > 80)
220
            pitch = 80;
clean pre-merge
Sébastien MARQUE authored on 2017-03-11
221
        elsif (pitch < -80)
AI disponible
Sébastien MARQUE authored on 2017-03-10
222
            pitch = -80;
223
        me.screenElements.Horizon
224
            .setRotation(-roll * D2R)
225
            .setTranslation(0, pitch * 6.8571428);
AI disponible, avec bankPoin...
Sébastien MARQUE authored on 2017-03-10
226
        me.screenElements.bankPointer
227
            .setRotation(-roll * D2R);
228
        settimer(func me.updateAI(getprop('/orientation/roll-deg'),getprop('orientation/pitch-deg')), 0.1);
AI disponible
Sébastien MARQUE authored on 2017-03-10
229
    },
animation VSI
Sébastien MARQUE authored on 2017-03-10
230

            
231
    updateVSI: func (vsi) {
232
        me.screenElements.VSIText
233
            .setText(num(math.round(vsi, 10)));
234
        if (vsi > 4500)
235
            vsi = 4500;
236
        elsif (vsi < -4500)
237
            vsi = -4500;
238
        me.screenElements.VSI
239
            .setTranslation(0, vsi * -0.03465);
240
        settimer(func me.updateVSI(getprop('/instrumentation/vertical-speed-indicator/indicated-speed-fpm')), 0.1);
241
    },
animation IAS
Sébastien MARQUE authored on 2017-03-10
242

            
243
    updateIAS: func (ias) {
244
        if (ias >= 10)
245
            me.screenElements.Speed110
246
                .setText(sprintf("% 2u",num(math.floor(ias/10))));
247
        else
248
            me.screenElements.Speed110
249
                .setText('');
250
        me.screenElements.SpeedLint1
251
            .setTranslation(0,(math.mod(ias,10) + (ias >= 10)*10) * 36);
252
        me.screenElements.SpeedTape
253
            .setTranslation(0,ias * 5.711);
254
        settimer(func me.updateIAS(getprop('/velocities/airspeed-kt')), 0.1);
255
    },
animation ALT
Sébastien MARQUE authored on 2017-03-11
256

            
257
    updateALT: func (alt) {
258
        if (alt < 0)
259
            me.screenElements.Alt11100
260
                .setText(sprintf("% 3i",math.ceil(alt/100)));
261
        elsif (alt < 100)
262
            me.screenElements.Alt11100
263
                .setText('');
264
        else
265
            me.screenElements.Alt11100
266
                .setText(sprintf("% 3i",math.floor(alt/100)));
267
        me.screenElements.AltLint00011
268
            .setTranslation(0,math.fmod(alt,100) * 1.24);
269

            
270
        # From Farmin/G1000 http://wiki.flightgear.org/Project_Farmin/FG1000
271
        if (alt> -1000 and alt< 1000000) {
272
            var Offset10 = 0;
273
            var Offset100 = 0;
274
            var Offset1000 = 0;
275
            if (alt< 0) {
276
                var Ne = 1;
277
                var alt= -alt;
278
            }
279
            else
280
                var Ne = 0;
281

            
282
            var Alt10       = math.mod(alt,100);
283
            var Alt100      = int(math.mod(alt/100,10));
284
            var Alt1000     = int(math.mod(alt/1000,10));
285
            var Alt10000    = int(math.mod(alt/10000,10));
286
            var Alt20       = math.mod(Alt10,20)/20;
287
            if (Alt10 >= 80)
288
                var Alt100 += Alt20;
289

            
290
            if (Alt10 >= 80 and Alt100 >= 9)
291
                var Alt1000 += Alt20;
292

            
293
            if (Alt10 >= 80 and Alt100 >= 9 and Alt1000 >= 9)
294
                var Alt10000 += Alt20;
295

            
296
            if (alt> 100)
297
                var Offset10 = 100;
298

            
299
            if (alt> 1000)
300
                var Offset100 = 10;
301

            
302
            if (alt> 10000)
303
                var Offset1000 = 10;
304

            
305
            if (!Ne) {
306
                me.screenElements.LintAlt.setTranslation(0,(math.mod(alt,100))*0.57375);
307
                var altCentral = (int(alt/100)*100);
308
            }
309
            elsif (Ne) {
310
                me.screenElements.LintAlt.setTranslation(0,(math.mod(alt,100))*-0.57375);
311
                var altCentral = -(int(alt/100)*100);
312
            }
313
            me.screenElements["AltBigC"].setText("");
314
            me.screenElements["AltSmallC"].setText("");
315
            for (var place = 1; place <= 6; place += 1) {
316
                var altUP = altCentral + (place*100);
317
                var offset = -30.078;
318
                if (altUP < 0) {
319
                    var altUP = -altUP;
320
                    var prefix = "-";
321
                    var offset += 15.039;
322
                }
323
                else
324
                    var prefix = "";
325

            
326
                if (altUP == 0) {
327
                    var AltBigUP    = "";
328
                    var AltSmallUP  = "0";
329

            
330
                }
331
                elsif (math.mod(altUP,500) == 0 and altUP != 0) {
332
                    var AltBigUP    = sprintf(prefix~"%1d", altUP);
333
                    var AltSmallUP  = "";
334
                }
335
                elsif (altUP < 1000 and (math.mod(altUP,500))) {
336
                    var AltBigUP    = "";
337
                    var AltSmallUP  = sprintf(prefix~"%1d", int(math.mod(altUP,1000)));
338
                    var offset = -30.078;
339
                }
340
                elsif ((altUP < 10000) and (altUP >= 1000) and (math.mod(altUP,500))) {
341
                    var AltBigUP    = sprintf(prefix~"%1d", int(altUP/1000));
342
                    var AltSmallUP  = sprintf("%1d", int(math.mod(altUP,1000)));
343
                    var offset += 15.039;
344
                }
345
                else {
346
                    var AltBigUP    = sprintf(prefix~"%1d", int(altUP/1000));
347
                    var mod = int(math.mod(altUP,1000));
348
                    var AltSmallUP  = sprintf("%1d", mod);
349
                    var offset += 30.078;
350
                }
351

            
352
                me.screenElements["AltBigU"~place].setText(AltBigUP);
353
                me.screenElements["AltSmallU"~place].setText(AltSmallUP);
354
                me.screenElements["AltSmallU"~place].setTranslation(offset,0);
355
                var altDOWN = altCentral - (place*100);
356
                var offset = -30.078;
357
                if (altDOWN < 0) {
358
                    var altDOWN = -altDOWN;
359
                    var prefix = "-";
360
                    var offset += 15.039;
361
                }
362
                else
363
                    var prefix = "";
364

            
365
                if (altDOWN == 0) {
366
                    var AltBigDOWN  = "";
367
                    var AltSmallDOWN    = "0";
368
                }
369
                elsif (math.mod(altDOWN,500) == 0 and altDOWN != 0) {
370
                    var AltBigDOWN  = sprintf(prefix~"%1d", altDOWN);
371
                    var AltSmallDOWN    = "";
372
                }
373
                elsif (altDOWN < 1000 and (math.mod(altDOWN,500))) {
374
                    var AltBigDOWN  = "";
375
                    var AltSmallDOWN    = sprintf(prefix~"%1d", int(math.mod(altDOWN,1000)));
376
                    var offset = -30.078;
377
                }
378
                elsif ((altDOWN < 10000) and (altDOWN >= 1000) and (math.mod(altDOWN,500))) {
379
                    var AltBigDOWN  = sprintf(prefix~"%1d", int(altDOWN/1000));
380
                    var AltSmallDOWN    = sprintf("%1d", int(math.mod(altDOWN,1000)));
381
                    var offset += 15.039;
382
                }
383
                else {
384
                    var AltBigDOWN  = sprintf(prefix~"%1d", int(altDOWN/1000));
385
                    var mod = int(math.mod(altDOWN,1000));
386
                    var AltSmallDOWN    = sprintf("%1d", mod);
387
                    var offset += 30.078;
388
                }
389
                me.screenElements["AltBigD"~place].setText(AltBigDOWN);
390
                me.screenElements["AltSmallD"~place].setText(AltSmallDOWN);
391
                me.screenElements["AltSmallD"~place].setTranslation(offset,0);
392
            }
393
        }
394
        settimer(func me.updateALT(getprop('instrumentation/altimeter/indicated-altitude-ft')), 0.2);
395
    },
animation HSI
Sébastien MARQUE authored on 2017-03-11
396

            
397
    updateHSI : func (hdg) {
398
        me.screenElements.Rose
399
            .setRotation(-hdg * D2R);
400
        me.screenElements['HDG-text']
401
            .setText(sprintf("%03u°", hdg));
402
        settimer(func me.updateHSI(getprop('orientation/heading-deg')), 0.1);
403
    },
NAV disponible (hors CDI)
Sébastien MARQUE authored on 2017-03-11
404

            
405
    updateNAV : func {
406
        # made active via menu
407
        if (contains(arg[0], "active")) {
408
            if (arg[0]['active'] == 'none') {
409
                me.screenElements['nav1-id']
410
                    .setColor(1,1,1);
411
                me.screenElements['nav1-selected-freq']
412
                    .setColor(1,1,1);
413
                me.screenElements['nav2-id']
414
                    .setColor(1,1,1);
415
                me.screenElements['nav2-selected-freq']
416
                    .setColor(1,1,1);
417
                me.screenElements['NAV1-pointer']
418
                    .hide();
419
                me.screenElements['NAV2-pointer']
420
                    .hide();
421
            }
422
            else {
423
                var inactive = (arg[0]['active'] == 1) + 1;
424
                me.screenElements['nav' ~ arg[0]['active'] ~ '-id']
425
                    .setColor(0,1,0);
426
                me.screenElements['nav' ~ arg[0]['active'] ~ '-selected-freq']
427
                    .setColor(0,1,0);
428
                me.screenElements['NAV' ~ arg[0]['active'] ~ '-pointer']
429
                    .show();
430
#                me.screenElements['HDI']
431
#                    .setRotation();
432
                me.screenElements['nav' ~ inactive ~ '-id']
433
                    .setColor(1,1,1);
434
                me.screenElements['nav' ~ inactive ~ '-selected-freq']
435
                    .setColor(1,1,1);
436
#                me.screenElements['NAV' ~ inactive ~ '-pointer']
437
#                    .hide();
438
#                foreach (var e; [ 'FROM', 'TO', 'CDI' ])
439
#                    me.screenElements['NAV' ~ inactive ~ '-' ~ e]
440
#                        .hide();
441
            }
442
        }
443
        if (contains(arg[0], 'tune')) {
Correction swap NAV tuning
Sébastien MARQUE authored on 2017-03-12
444
            var n = getprop('/instrumentation/zkv1000/radios/nav-tune');
445
            # n = 0 -> NAV1
446
            # n = 1 -> NAV2
NAV disponible (hors CDI)
Sébastien MARQUE authored on 2017-03-11
447
            me.screenElements['nav-freq-switch']
Correction swap NAV tuning
Sébastien MARQUE authored on 2017-03-12
448
                .setTranslation(0, n * 25);
449
            me.screenElements['nav' ~ (n + 1) ~ '-standby-freq']
NAV disponible (hors CDI)
Sébastien MARQUE authored on 2017-03-11
450
                .setColor(0,1,1);
Correction swap NAV tuning
Sébastien MARQUE authored on 2017-03-12
451
            me.screenElements['nav' ~ ((n == 0) + 1) ~ '-standby-freq']
NAV disponible (hors CDI)
Sébastien MARQUE authored on 2017-03-11
452
                .setColor(1,1,1);
453
        }
454
        if (contains(arg[0], 'nav-id')) {
Correction swap NAV tuning
Sébastien MARQUE authored on 2017-03-12
455
            # TODO: récupérer la valeur via les paramètres transmis du listener
NAV disponible (hors CDI)
Sébastien MARQUE authored on 2017-03-11
456
            var navid = getprop('/instrumentation/nav[' ~ (arg[0]['nav-id'] - 1) ~ ']/nav-id');
457
            if (navid == nil)
458
                navid = '';
459
            me.screenElements["nav" ~ arg[0]['nav-id'] ~ "-id"]
460
                    .setText(navid); # veut pas exister au début...
461
        }
462
        if (contains(arg[0], 'refresh')) {
Correction swap NAV tuning
Sébastien MARQUE authored on 2017-03-12
463
            # rafraichi une seule ligne NAV1 ou NAV2
NAV disponible (hors CDI)
Sébastien MARQUE authored on 2017-03-11
464
            me.screenElements['nav' ~ arg[0].refresh ~ '-selected-freq']
465
                .setText(getprop('/instrumentation/nav[' ~ (arg[0].refresh - 1) ~ ']/frequencies/selected-mhz-fmt'));
466
            me.screenElements['nav' ~ arg[0].refresh ~ '-standby-freq']
467
                .setText(getprop('/instrumentation/nav[' ~ (arg[0].refresh - 1) ~ ']/frequencies/standby-mhz-fmt'));
468
        }
469
        if (contains(arg[0], 'set')) {
Correction swap NAV tuning
Sébastien MARQUE authored on 2017-03-12
470
            # positionne la valeur modifiée, les listeners "trigguent" en permanence ces propriétés, donc exit
NAV disponible (hors CDI)
Sébastien MARQUE authored on 2017-03-11
471
            var n = getprop('/instrumentation/zkv1000/radios/nav-tune');
472
            me.screenElements['nav' ~ (n + 1) ~ '-standby-freq']
473
                .setText(getprop('/instrumentation/nav[' ~ n ~ ']/frequencies/standby-mhz-fmt'));
474
        }
475
        if (contains(arg[0], 'auto')) {
Correction swap NAV tuning
Sébastien MARQUE authored on 2017-03-12
476
            # pour rafraichir automagiquement, toutes les deux secondes un refresh pour un NAV
NAV disponible (hors CDI)
Sébastien MARQUE authored on 2017-03-11
477
            me.updateNAV({refresh: 1});
478
            settimer(func me.updateNAV({refresh: 2}), 1);
479
            settimer(func me.updateNAV({auto:1}),     2);
480
        }
481
    },
commit initial
Sébastien MARQUE authored on 2017-03-07
482
};