zkv1000 / Nasal / softkeys.nas /
Newer Older
440 lines | 23.922kb
commit initial
Sébastien MARQUE authored on 2017-03-07
1
var softkeysClass = {
improves role/name variables...
Sébastien MARQUE authored on 2017-04-08
2
    new : func (device) {
commit initial
Sébastien MARQUE authored on 2017-03-07
3
        var m = { parents: [ softkeysClass ] };
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
4
        m.device = device;
5
        m.path = [];
improves softkeys coloring
Sébastien MARQUE authored on 2017-04-15
6
        m.colored = {};
commit initial
Sébastien MARQUE authored on 2017-03-07
7
        return m;
8
    },
9

            
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
10
    SoftKey : func (n, a) {
11
        # released key not yet managed
12
        if (a == 1)
13
            return;
14

            
15
        var key = me.device.display.screenElements[sprintf("SoftKey%02i-text",n)].get('text');
16
        if (key == '' or key == nil)
17
            return;
18

            
improves role/name variables...
Sébastien MARQUE authored on 2017-04-08
19
        var path = keyMap[me.device.role];
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
20
        foreach(var p; me.path) {
21
            if (contains(path, p))
22
                path = path[p];
23
            else
24
                break;
commit initial
Sébastien MARQUE authored on 2017-03-07
25
        }
26

            
improves role/name variables...
Sébastien MARQUE authored on 2017-04-08
27
        var bindings = me.bindings[me.device.role];
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
28
        foreach(var p; me.path) {
29
            if (contains(bindings, p))
30
                bindings = bindings[p];
31
            else
32
                break;
commit initial
Sébastien MARQUE authored on 2017-03-07
33
        }
34

            
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
35
        if (contains(path, key)) {
36
            append(me.path, key);
fix issue with some menus
Sébastien MARQUE authored on 2017-03-20
37
            if (contains(bindings, key))
38
                if (contains(bindings[key], 'hook'))
39
                    call(bindings[key].hook, [], me);
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
40
            me.device.display.updateSoftKeys();
commit initial
Sébastien MARQUE authored on 2017-03-07
41
        }
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
42
        elsif (contains(bindings, key)) {
43
            call(bindings[key], [], me);
commit initial
Sébastien MARQUE authored on 2017-03-07
44
        }
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
45
        elsif (key == 'BACK') {
46
            pop(me.path);
47
            me.device.display.updateSoftKeys();
commit initial
Sébastien MARQUE authored on 2017-03-07
48
        }
show the complete path menu ...
Sébastien MARQUE authored on 2017-03-20
49
        else {
50
            var list_path = '';
51
            foreach(var p; me.path) list_path ~= p ~ '/';
52
            print(me.device.role ~ ':' ~ list_path ~ key ~ ' : not yet implemented');
53
        }
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
54
    },
55

            
56
    bindings : {
57
        PFD : {
58
            INSET: {
59
                OFF: func {
60
                    pop(me.path);
61
                    me.device.display.updateSoftKeys();
62
                },
63
            },
64
            PFD: {
adds OAT, TAS, GSPD, WindDat...
Sébastien MARQUE authored on 2017-03-15
65
                'AOA/WIND' : {
66
                    WIND : {
67
                        OPTN1 : func {
68
                            me.device.display._winddata_optn = 1;
69
                            me.device.display.screenElements['WindData'].show();
70
                            me.device.display.screenElements['WindData-OPTN1'].show();
71
                            me.device.display.screenElements['WindData-OPTN1-HDG'].show();
72
                            me.device.display.screenElements['WindData-OPTN2'].hide();
73
                            me.device.display.updateWindData();
uses the new coloration for ...
Sébastien MARQUE authored on 2017-04-15
74
                            me.device.display.setSoftKeyColor(2, 1);
75
                            me.colored['PFDAOA/WINDWINDOPTN1'] = 1;
76
                            me.device.display.setSoftKeyColor(3, 0);
77
                            delete(me.colored, 'PFDAOA/WINDWINDOPTN2');
adds OAT, TAS, GSPD, WindDat...
Sébastien MARQUE authored on 2017-03-15
78
                        },
79
                        OPTN2 : func {
80
                            me.device.display._winddata_optn = 2;
81
                            me.device.display.screenElements['WindData'].show();
82
                            me.device.display.screenElements['WindData-OPTN1'].hide();
83
                            me.device.display.screenElements['WindData-OPTN2'].show();
84
                            me.device.display.screenElements['WindData-OPTN2-symbol'].show();
85
                            me.device.display.screenElements['WindData-OPTN2-headwind'].show();
86
                            me.device.display.screenElements['WindData-OPTN2-crosswind'].show();
87
                            me.device.display.updateWindData();
uses the new coloration for ...
Sébastien MARQUE authored on 2017-04-15
88
                            me.device.display.setSoftKeyColor(2, 0);
89
                            delete(me.colored, 'PFDAOA/WINDWINDOPTN1');
90
                            me.device.display.setSoftKeyColor(3, 1);
91
                            me.colored['PFDAOA/WINDWINDOPTN2'] = 1;
adds OAT, TAS, GSPD, WindDat...
Sébastien MARQUE authored on 2017-03-15
92
                        },
93
                        OFF : func {
94
                            me.device.display._winddata_optn = 0;
95
                            me.device.display.screenElements['WindData'].hide();
96
                            me.device.display.screenElements['WindData-OPTN1'].hide();
97
                            me.device.display.screenElements['WindData-OPTN2'].hide();
uses the new coloration for ...
Sébastien MARQUE authored on 2017-04-15
98
                            me.device.display.setSoftKeyColor(2, 0);
99
                            delete(me.colored, 'PFDAOA/WINDWINDOPTN1');
100
                            me.device.display.setSoftKeyColor(3, 0);
101
                            delete(me.colored, 'PFDAOA/WINDWINDOPTN2');
adds OAT, TAS, GSPD, WindDat...
Sébastien MARQUE authored on 2017-03-15
102
                        },
103
                    },
104
                },
adds BRG1/2 animation
Sébastien MARQUE authored on 2017-03-16
105
                BRG1 : func (brg = 1){
106
                    var source = 'brg' ~ brg ~ '-source';
107
                    var list = ['NAV' ~ brg, 'GPS', 'ADF', 'OFF'];
108
                    var index = std.Vector
109
                                   .new(list)
110
                                   .index(radios.getNode(source).getValue());
111
                    var next = (index == size(list) -1) ?  0 : index + 1;
112
                    radios.getNode(source).setValue(list[next]);
uses the new coloration for ...
Sébastien MARQUE authored on 2017-04-15
113
                    if (list[next] != 'OFF') {
114
                        me.device.display.setSoftKeyColor(brg == 1 ? 4 : 6, 1);
115
                        me.colored['PFDBRG' ~ brg] = 1;
116
                    }
117
                    else {
118
                        me.device.display.setSoftKeyColor(brg == 1 ? 4 : 6, 0);
119
                        delete(me.colored, 'PFDBRG' ~ brg);
120
                    }
adds BRG1/2 animation
Sébastien MARQUE authored on 2017-03-16
121
                },
122
                BRG2 : func {
123
                    call(me.bindings.PFD.PFD.BRG1, [ 2 ], me);
124
                },
adds BARO settings
Sébastien MARQUE authored on 2017-03-20
125
                'STD BARO' : func {
126
                    setprop('/instrumentation/altimeter/setting-inhg', 29.92);
127
                    me.device.display.updateBARO();
128
                    pop(me.path);
129
                    me.device.display.updateSoftKeys();
130
                },
131
                IN :  func {
132
                    me.device.display._baro_unit = 'inhg';
133
                    me.device.display.updateBARO();
134
                },
135
                HPA : func {
136
                    me.device.display._baro_unit = 'hpa';
137
                    me.device.display.updateBARO();
138
                },
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
139
            },
140
            XPDR: {
adds transponder
Sébastien MARQUE authored on 2017-03-17
141
                STBY : func {
142
                    setprop('/instrumentation/transponder/ident', 0);
143
                    setprop('/instrumentation/transponder/knob-mode', 1);
144
                    setprop('/instrumentation/zkv1000/radio/xpdr-mode', 'STBY');
145
                    me.device.display.updateXPDR();
146
                },
147
                ON : func {
148
                    setprop('/instrumentation/transponder/ident', 1);
149
                    setprop('/instrumentation/transponder/knob-mode', 4);
150
                    setprop('/instrumentation/zkv1000/radio/xpdr-mode', 'ON');
151
                    me.device.display.updateXPDR();
152
                },
153
                ALT : func {
154
                    setprop('/instrumentation/transponder/ident', 1);
155
                    setprop('/instrumentation/transponder/knob-mode', 5);
156
                    setprop('/instrumentation/zkv1000/radio/xpdr-mode', 'ALT');
157
                    me.device.display.updateXPDR();
158
                },
159
                VFR : func {
160
                    setprop('/instrumentation/transponder/id-code', '1200');
161
                    me.device.display.updateXPDR();
162
                },
163
                IDENT : func {
164
                    call(me.bindings.PFD.IDENT, [], me);
165
                },
166
                CODE : {
167
                    '0' : func (n = 0) {
XPDR settings via knob or so...
Sébastien MARQUE authored on 2017-03-22
168
                        if (getprop('/instrumentation/zkv1000/radios/xpdr-tuning-fms-method'))
169
                            return;
170
                        me.device.display.timers2.softkeys_inactivity.stop();
Softkeys revert to the previ...
Sébastien MARQUE authored on 2017-03-21
171
                        me.bindings.PFD.XPDR.CODE.inactivity.restart(me.device.display.softkeys_inactivity_delay);
XPDR settings via knob or so...
Sébastien MARQUE authored on 2017-03-22
172
                        # disable FMS knob entering method
173
                        me.device.knobs.FmsInner = void;
174
                        # When entering the code, the next softkey in sequence
175
                        # must be pressed within 10 seconds, or the entry is cancelled
176
                        # and restored to the previous code
177
                        if (!contains(me.bindings.PFD.XPDR.CODE, 'on_change_inactivity')) {
178
                            me.bindings.PFD.XPDR.CODE.on_change_inactivity = maketimer(10,
179
                                func {
180
                                    setprop('/instrumentation/zkv1000/radios/xpdr-tuning-digit', 3);
181
                                    me.device.knobs.FmsInner = me.device.knobs.XPDRCodeSetDigits;
182
                                    me.device.knobs.FmsOuter = me.device.knobs.XPDRCodeNextDigits;
183
                                    call(me.bindings.PFD.XPDR.CODE.restore, [], me);
184
                                });
185
                            me.bindings.PFD.XPDR.CODE.on_change_inactivity.singleShot = 1;
186
                            me.bindings.PFD.XPDR.CODE.on_change_inactivity.start();
187
                        }
188
                        else
189
                            me.bindings.PFD.XPDR.CODE.on_change_inactivity.restart(10);
adds transponder
Sébastien MARQUE authored on 2017-03-17
190
                        var tuning = radios.getNode('xpdr-tuning-digit');
191
                        var d = tuning.getValue();
192
                        setprop('/instrumentation/transponder/inputs/digit[' ~ d ~ ']', n);
XPDR settings via knob or so...
Sébastien MARQUE authored on 2017-03-22
193
                        if (d == 1) {
194
                            if (!contains(me.bindings.PFD.XPDR.CODE, 'on_change_auto_validation'))
195
                                me.bindings.PFD.XPDR.CODE.on_change_auto_validation = maketimer(5,
196
                                    func call(me.bindings.PFD.IDENT, [], me));
197
                            me.bindings.PFD.XPDR.CODE.on_change_auto_validation.singleShot = 1;
198
                            me.bindings.PFD.XPDR.CODE.on_change_auto_validation.start();
199
                        }
200
                        else {
201
                            d -= 1;
202
                            tuning.setValue(d);
203
                        }
adds transponder
Sébastien MARQUE authored on 2017-03-17
204
                        me.device.display.updateXPDR();
205
                    },
206
                    '1' : func {
207
                        call(me.bindings.PFD.XPDR.CODE['0'], [ 1 ], me);
208
                    },
209
                    '2' : func {
210
                        call(me.bindings.PFD.XPDR.CODE['0'], [ 2 ], me);
211
                    },
212
                    '3' : func {
213
                        call(me.bindings.PFD.XPDR.CODE['0'], [ 3 ], me);
214
                    },
215
                    '4' : func {
216
                        call(me.bindings.PFD.XPDR.CODE['0'], [ 4 ], me);
217
                    },
218
                    '5' : func {
219
                        call(me.bindings.PFD.XPDR.CODE['0'], [ 5 ], me);
220
                    },
221
                    '6' : func {
222
                        call(me.bindings.PFD.XPDR.CODE['0'], [ 6 ], me);
223
                    },
224
                    '7' : func {
225
                        call(me.bindings.PFD.XPDR.CODE['0'], [ 7 ], me);
226
                    },
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
227
                    IDENT: func {
Softkeys revert to the previ...
Sébastien MARQUE authored on 2017-03-21
228
                        me.bindings.PFD.XPDR.CODE.inactivity.restart(me.device.display.softkeys_inactivity_delay);
229
                        me.device.display.timers2.softkeys_inactivity.restart(me.device.display.softkeys_inactivity_delay);
adds transponder
Sébastien MARQUE authored on 2017-03-17
230
                        call(me.bindings.PFD.IDENT, [], me);
231
                    },
232
                    BKSP: func {
XPDR settings via knob or so...
Sébastien MARQUE authored on 2017-03-22
233
                        if (getprop('/instrumentation/zkv1000/radios/xpdr-tuning-fms-method'))
234
                            return;
235
                        if (contains(me.bindings.PFD.XPDR.CODE, 'on_change_inactivity'))
236
                            me.bindings.PFD.XPDR.CODE.on_change_inactivity.restart(10);
237
                        if (contains(me.bindings.PFD.XPDR.CODE, 'on_change_auto_validation'))
238
                                me.bindings.PFD.XPDR.CODE.on_change_auto_validation.stop();
adds transponder
Sébastien MARQUE authored on 2017-03-17
239
                        var tuning = radios.getNode('xpdr-tuning-digit');
240
                        var d = tuning.getValue();
XPDR settings via knob or so...
Sébastien MARQUE authored on 2017-03-22
241
                        if (d < 3) {
242
                            d += 1;
243
                            tuning.setValue(d);
244
                        }
adds transponder
Sébastien MARQUE authored on 2017-03-17
245
                        me.device.display.updateXPDR();
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
246
                    },
adds transponder
Sébastien MARQUE authored on 2017-03-17
247
                    BACK : func (inactive = 0) {
XPDR settings via knob or so...
Sébastien MARQUE authored on 2017-03-22
248
                        call(me.bindings.PFD.XPDR.CODE.restore, [], me);
adds transponder
Sébastien MARQUE authored on 2017-03-17
249
                        pop(me.path);
XPDR settings via knob or so...
Sébastien MARQUE authored on 2017-03-22
250
                        call(me.bindings.PFD.XPDR.CODE.exit, [me.path], me);
251
                    },
252
                    restore : func {
253
                        setprop('/instrumentation/transponder/id-code',
254
                            sprintf('%s', getprop('/instrumentation/zkv1000/radios/xpdr-backup-code')));
255
                        me.device.display.updateXPDR();
adds transponder
Sébastien MARQUE authored on 2017-03-17
256
                    },
257
                    exit : func (p) {
Softkeys revert to the previ...
Sébastien MARQUE authored on 2017-03-21
258
                        if (contains(me.bindings.PFD.XPDR.CODE, 'inactivity')) # does not exists if IDENT pressed from top-level
259
                            me.bindings.PFD.XPDR.CODE.inactivity.stop();
adds transponder
Sébastien MARQUE authored on 2017-03-17
260
                        radios.removeChild('xpdr-tuning-digit', 0);
261
                        radios.removeChild('xpdr-backup-code', 0);
XPDR settings via knob or so...
Sébastien MARQUE authored on 2017-03-22
262
                        radios.removeChild('xpdr-tuning-fms-method', 0);
adds transponder
Sébastien MARQUE authored on 2017-03-17
263
                        me.path = p;
264
                        me.device.display.updateXPDR();
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
265
                        me.device.display.updateSoftKeys();
XPDR settings via knob or so...
Sébastien MARQUE authored on 2017-03-22
266
                        me.device.knobs.FmsInner = void;
267
                        me.device.knobs.FmsOuter = void;
268
                        me.device.display.timers2.softkeys_inactivity.restart(me.device.display.softkeys_inactivity_delay);
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
269
                    },
adds transponder
Sébastien MARQUE authored on 2017-03-17
270
                    hook : func {
XPDR settings via knob or so...
Sébastien MARQUE authored on 2017-03-22
271
                        # this level has its own timer as we may need to revert changes, and got different timers
272
                        me.device.display.timers2.softkeys_inactivity.stop();
Softkeys revert to the previ...
Sébastien MARQUE authored on 2017-03-21
273
                        me.bindings.PFD.XPDR.CODE.inactivity = maketimer(
274
                            me.device.display.softkeys_inactivity_delay,
XPDR settings via knob or so...
Sébastien MARQUE authored on 2017-03-22
275
                            func call(me.bindings.PFD.XPDR.CODE.BACK, [], me));
Softkeys revert to the previ...
Sébastien MARQUE authored on 2017-03-21
276
                        me.bindings.PFD.XPDR.CODE.inactivity.singleShot = 1;
277
                        me.bindings.PFD.XPDR.CODE.inactivity.start();
adds transponder
Sébastien MARQUE authored on 2017-03-17
278
                        var tuning = getprop('/instrument/zkv1000/radios/xpdr-tuning-digit');
279
                        if (tuning == nil) {
280
                            radios.getNode('xpdr-tuning-digit', 1).setValue(3);
281
                            radios.getNode('xpdr-backup-code', 1).setValue(getprop('/instrumentation/transponder/id-code'));
XPDR settings via knob or so...
Sébastien MARQUE authored on 2017-03-22
282
                            radios.getNode('xpdr-tuning-fms-method', 1).setValue(0);
adds transponder
Sébastien MARQUE authored on 2017-03-17
283
                            me.device.display.updateXPDR();
284
                        }
XPDR settings via knob or so...
Sébastien MARQUE authored on 2017-03-22
285
                        me.device.knobs.FmsInner = me.device.knobs.XPDRCodeSetDigits;
286
                        me.device.knobs.FmsOuter = me.device.knobs.XPDRCodeNextDigits;
adds transponder
Sébastien MARQUE authored on 2017-03-17
287
                    },
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
288
                },
adds transponder
Sébastien MARQUE authored on 2017-03-17
289
            },
290
            IDENT : func {
291
                if (getprop('/instrumentation/zkv1000/radio/xpdr-mode') == 'STBY')
292
                    return;
293
                setprop('/instrumentation/transponder/ident', 1);
294
                me.bindings.PFD.XPDR.ident = maketimer(18,
295
                        func {
296
                            setprop('/instrumentation/transponder/ident', 0);
297
                            me.device.display.updateXPDR();
298
                        });
299
                me.bindings.PFD.XPDR.ident.singleShot = 1;
300
                me.bindings.PFD.XPDR.ident.start();
XPDR settings via knob or so...
Sébastien MARQUE authored on 2017-03-22
301
                call(me.bindings.PFD.XPDR.CODE.exit, [], me);
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
302
            },
adds CDI
Sébastien MARQUE authored on 2017-03-18
303
            CDI : func {
304
                var list = ['OFF'];
305
                if (getprop('/instrumentation/gps/route-distance-nm') != nil)
306
                    append(list, 'GPS');
307
                if (getprop('/instrumentation/nav/in-range') != nil)
308
                    append(list, 'NAV1');
309
                if (getprop('/instrumentation/nav[1]/in-range') != nil)
310
                    append(list, 'NAV2');
311
                var index = std.Vector
312
                               .new(list)
313
                               .index(cdi.getNode('source').getValue());
314
                var next = (index == size(list) -1) ?  0 : index + 1;
315
                cdi.getNode('source').setValue(list[next]);
316
                CDIfromSOURCE(list[next]);
317
                me.device.display.updateCDI();
318
            },
TMR/REF window
Sébastien MARQUE authored on 2017-03-28
319
            'TMR/REF' : func {
320
                if (!contains(me.device.windows.state, 'TMR/REF')) {
TMR/REF available
Sébastien MARQUE authored on 2017-04-10
321
                    var Vspeed_visiblity = func (id, selected, Vspeed)
322
                        me.device.data[Vspeed ~ '-visible'] =
323
                            me.device.windows.state[id].objects[selected].text
324
                            ==
325
                            me.device.windows.state[id].objects[selected].choices[0];
326
                    var GenericTimer = func (id, selected) {
327
                        var action = me.device.windows.state[id].objects[selected].text;
328
                        if (action == 'START?') {
329
                            me.device.data.TMRrevert = 0;
330
                            me.device.data.TMRlast = getprop('/sim/time/elapsed-sec') - 1;
331
                            me.device.data.TMRreset = me.device.windows.state[id].objects[selected - 2].text;
332
                            me.device.data.TMRtimer = maketimer(1, func {
333
                                    var (hh, mm, ss) = split(':',
334
                                            me.device.windows.state[id].objects[selected - 2].text);
335
                                    var direction = -1;
336
                                    if ((me.device.windows.state[id].objects[selected - 1].text
337
                                            ==
338
                                        me.device.windows.state[id].objects[selected - 1].choices[0])
339
                                    or me.device.data.TMRrevert)
340
                                        direction = 1;
341
                                    var now = getprop('/sim/time/elapsed-sec');
342
                                    var dt = int(now - me.device.data.TMRlast) * direction;
343
                                    me.device.data.TMRlast = now;
344
                                    var val = HMS(hh, mm, ss, dt);
345
                                    me.device.windows.state[id].objects[selected - 2].text = val;
346
                                    me.device.windows.window[id ~ '-' ~ (selected -2)]
347
                                        .setText(val);
348
                                    if (val == '00:00:00' and direction == -1)
349
                                        me.device.data.TMRrevert = 1;
350
                                }, me);
351
                            me.device.data.TMRtimer.start();
352
                            action = 'STOP?';
353
                        }
354
                        elsif (action == 'STOP?') {
355
                            me.device.data.TMRtimer.stop();
356
                            action = 'RESET?';
357
                        }
358
                        elsif (action == 'RESET?') {
359
                            action = 'START?';
360
                            if ((me.device.windows.state[id].objects[selected - 1].text
361
                                        ==
362
                                me.device.windows.state[id].objects[selected - 1].choices[1])
363
                            and !me.device.data.TMRrevert)
364
                                var val = me.device.data.TMRreset;
365
                            else
366
                                var val = '00:00:00';
367
                            me.device.windows.state[id].objects[selected - 2].text = val;
368
                            me.device.windows.window[id ~ '-' ~ (selected -2)]
369
                                .setText(val);
370
                        }
371
                        me.device.windows.window[me.device.windows.selected]
372
                            .setText(action);
373
                        me.device.windows.state[id].objects[selected].text = action;
374
                    };
TMR/REF window
Sébastien MARQUE authored on 2017-03-28
375
                    me.device.windows.draw(
376
                        'TMR/REF',
377
                        {x: 720, y: 535, w: 300, l: 5, sep: 3},
TMR/REF window adaptation
Sébastien MARQUE authored on 2017-04-02
378
                        [ # objects infos
TMR/REF window
Sébastien MARQUE authored on 2017-03-28
379
                            {text: 'REFERENCES', type: 'title'},
380
                            {type: 'separator'},
381
                            {text: 'TIMER', type: 'normal'},
382
                            {text: '00:00:00', type: 'selected|time', },
TMR/REF available
Sébastien MARQUE authored on 2017-04-10
383
                            {text: '  UP >', type: 'editable', choices: ['  UP >', '<DOWN ']},
384
                            {text: 'START?', type: 'editable|end-of-line', callback: func (id, selected) GenericTimer(id, selected)},
TMR/REF window
Sébastien MARQUE authored on 2017-03-28
385
                            {type: 'separator'},
TMR/REF available
Sébastien MARQUE authored on 2017-04-10
386
                            {text: sprintf('Vx     %3iKT', alerts.getNode('Vx').getValue()), type: 'normal', scrollgroup:0},
387
                            {text: me.device.data['Vx-visible'] ? '   ON >' : '< OFF  ', type: 'editable|immediate|end-of-line', choices: ['   ON >', '< OFF  '], scrollgroup:0, callback: func (id, selected) Vspeed_visiblity(id, selected, 'Vx')},
388
                            {text: sprintf('Vy     %3iKT', alerts.getNode('Vy').getValue()), type: 'normal', scrollgroup:1},
389
                            {text: me.device.data['Vy-visible'] ? '   ON >' : '< OFF  ', type: 'editable|immediate|end-of-line', choices: ['   ON >', '< OFF  '], scrollgroup:1, callback: func (id, selected) Vspeed_visiblity(id, selected, 'Vy')},
390
                            {text: sprintf('Vr     %3iKT', alerts.getNode('Vr').getValue()), type: 'normal', scrollgroup:2},
391
                            {text: me.device.data['Vr-visible'] ? '   ON >' : '< OFF  ', type: 'editable|immediate|end-of-line', choices: ['   ON >', '< OFF  '], scrollgroup:2, callback: func (id, selected) Vspeed_visiblity(id, selected, 'Vr')},
392
                            {text: sprintf('Vglide %3iKT', alerts.getNode('Vglide').getValue()), type: 'normal', scrollgroup:3},
393
                            {text: me.device.data['Vglide-visible'] ? '   ON >' : '< OFF  ', type: 'editable|immediate|end-of-line', choices: ['   ON >', '< OFF  '], scrollgroup:3, callback: func (id, selected) Vspeed_visiblity(id, selected, 'Vglide')},
TMR/REF window
Sébastien MARQUE authored on 2017-03-28
394
                            {type: 'separator'},
395
                            {text: 'MINIMUMS', type: 'normal'},
TMR/REF available
Sébastien MARQUE authored on 2017-04-10
396
                            {text: '   OFF   >', type: 'editable', choices: ['   OFF   >', '<  BARO  >','<TEMP COMP'], callback: func},
TMR/REF window adaptation
Sébastien MARQUE authored on 2017-04-02
397
                            {text: ' 1000FT', type: 'editable', format: '% 5iFT', factor: 100, callback: func},
398
                        ],
399
                        { # scrolling info, see menu.nas
400
                            lines : 3,
401
                            columns : 2,
402
                        }
TMR/REF window
Sébastien MARQUE authored on 2017-03-28
403
                    );
404
                    me.device.knobs.FmsInner = me.device.knobs.MenuSettings;
405
                    me.device.knobs.FmsOuter = me.device.knobs.NavigateMenu;
TMR/REF available
Sébastien MARQUE authored on 2017-04-10
406
                    me.device.buttons.ENT = me.device.buttons.ValidateTMRREF;
407
                    me.device.buttons.FMS = me.device.buttons.ValidateTMRREF;
408
                    me.device.buttons.CLR = me.device.buttons.ClearTMRREF;
TMR/REF window
Sébastien MARQUE authored on 2017-03-28
409
                }
410
                else {
TMR/REF available
Sébastien MARQUE authored on 2017-04-10
411
                    me.device.buttons.ClearTMRREF();
TMR/REF window
Sébastien MARQUE authored on 2017-03-28
412
                }
413
            },
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
414
        },
415
        MFD : {
416
            ENGINE: {
417
                FUEL: {
418
                    UNDO: func {
419
                        pop(me.path);
420
                        me.device.display.updateSoftKeys();
421
                    },
422
                    ENTER: func {
423
                        pop(me.path);
424
                        me.device.display.updateSoftKeys();
425
                    },
426
                },
427
                ENGINE: func {
428
                    me.path = [];
429
                    me.device.display.updateSoftKeys();
430
                },
431
            },
add missing exit to MFD/CHKL...
Sébastien MARQUE authored on 2017-03-20
432
            CHKLIST : {
433
                EXIT: func {
434
                    me.path = [];
435
                    me.device.display.updateSoftKeys();
436
                },
437
            },
softkeys are available now
Sébastien MARQUE authored on 2017-03-14
438
        },
commit initial
Sébastien MARQUE authored on 2017-03-07
439
    },
440
};