zkv1000 / Nasal / menu.nas /
Newer Older
86 lines | 2.838kb
commit initial
Sébastien MARQUE authored on 2017-03-07
1
var ADFDME = func { 
2
    nyi('AFDME softkey'); 
3
}
4

            
5
var IDENT = func { 
6
    nyi('IDENT softkey'); 
7
}
8

            
9
var VOR1 = func {
10
    radios.getNode('nav2-selected').setIntValue(0);
11
    radios.getNode('nav1-selected').setIntValue(1);
12
    CDIfromNAV(0);
13
}
14

            
15
var VOR2 = func {
16
    radios.getNode('nav1-selected').setIntValue(0);
17
    radios.getNode('nav2-selected').setIntValue(1);
18
    CDIfromNAV(1);
19
}
20

            
21
var STDBY = func { 
22
    setprop('/instrumentation/zkv1000/radios/xpdr-mode', 'STBY');
23
    setprop('/instrumentation/transponder/serviceable', 0);
24
}
25

            
26
var ON = func { 
27
    setprop("/instrumentation/zkv1000/radios/xpdr-mode", "ON");
28
}
29

            
30
var ALT = func { 
31
    setprop("/instrumentation/zkv1000/radios/xpdr-mode", "ALT");
32
}
33

            
34
var GND = func { 
35
    setprop("/instrumentation/zkv1000/radios/xpdr-mode", "GND");
36
}
37

            
38
var VFR = func { 
39
    XPDR_old = getprop("/instrumentation/transponder/id-code");
40
    setprop("/instrumentation/transponder/id-code", 1200);
41
}
42

            
43
var BKSP = func { 
44
    if (XPDR_n < 3) XPDR_n += 1;
45
}
46

            
47
var LIGHT = func {
48
    var b = '/instrumentation/zkv1000/body-emission';
49
    setprop(b, getprop(b) < 0.1 ? 0.5 : 0.0);
50
}
51

            
52
var CHECKLIST = func {
53
}
54

            
55
var LEAN = func {
56
}
57

            
58
var FUEL = func (v) {
59
}
60

            
61
var XPDR_n = 3;
62
var XPDR_old = 0;
63

            
64

            
65
var menuTable = [
66
    '         INSET            PFD              CDI    ADF   XPDR  IDENT   TMR   NRST',
67
    '         VOR1   VOR2   GPS    OFF                                                 BACK',
68
    ' OFF   DCLTR          TRAFF  TOPO  TERR  STRM   NEXR XMLTG           BACK',
69
    ' OFF   DCLT1 DCLT2 DCLT3                                                        BACK',
70
    'LIGHT DFLTS  WIND   DME   BRG1   HSI    BRG2           ALT U  BARO  BACK',
71
    'VOR1    GPS    ADF             OFF                                                BACK',
72
    'VOR2    GPS    ADF             OFF                                                BACK',
73
    '                                               360    ARC                              BACK',
74
    '                  OPT1   OPT2   OPT3            OFF                              BACK',
75
    '                                             METER             IN     HPA            BACK',
76
    '                   STBY    ON     ALT    GND    VFR   CODE  IDENT          BACK',
77
    '   0        1       2        3       4        5       6        7    IDENT  BKSP  BACK',
78
    ' SFD    ENG             MAP           DCLTR          CHKLS',
79
    '                 DCLT1           DCLT2          DCLT3                             BACK',
80
    '                          TRAFF  TOPO   TERR  STRM  NEXR  XMLTG          BACK',
81
    'ENGN           LEAN                              DECF   INCF   RSTF',
82
    ' MFD  INSET            PFD              CDI    ADF   XPDR  IDENT   TMR   NRST',
83
    '  LCL    UTC               RL            CHRON                                     BACK',
84
];
85

            
86