zkv1000 / Nasal / softkeys.nas /
Newer Older
419 lines | 22.666kb
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 = [];
commit initial
Sébastien MARQUE authored on 2017-03-07
6
        return m;
7
    },
8

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

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

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

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

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

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