commit initial
|
1 |
var buttonsClass = { |
2 |
new : func (node) { |
|
3 |
var m = { parents: [ buttonsClass ] }; |
|
4 |
m.node = node; |
|
5 |
return m; |
|
6 |
}, |
|
7 | ||
8 |
PAN : func (xdir = 0, ydir = 0) { |
|
9 |
}, |
|
10 | ||
11 |
AsSwitchNAV : func { |
|
12 |
var n = getprop('/instrumentation/zkv1000/radios/nav-tune'); |
|
13 |
var tmp = getprop('/instrumentation/nav[' ~ n ~ ']/frequencies/selected-mhz'); |
|
14 |
setprop('/instrumentation/nav[' ~ n ~ ']/frequencies/selected-mhz', getprop('/instrumentation/nav[' ~ n ~ ']/frequencies/standby-mhz')); |
|
15 |
setprop('/instrumentation/nav[' ~ n ~ ']/frequencies/standby-mhz', tmp); |
|
new var organistaion (and fi...
|
16 |
if (contains(PFD, 'display')) |
17 |
PFD.display.updateNAV({refresh: n+1}); |
|
18 |
if (contains(MFD, 'display')) |
|
19 |
MFD.display.updateNAV({refresh: n+1}); |
|
commit initial
|
20 |
}, |
21 | ||
ajout de l'animation des bou...
|
22 |
AsSwitchCOM : func (x) { |
commit initial
|
23 |
if (x) { |
ajout de l'animation des bou...
|
24 |
me.AsSwitchCOM_pushed = getprop('/sim/time/elapsed-sec'); |
commit initial
|
25 |
} |
ajout de l'animation des bou...
|
26 |
else { |
27 |
var pressed = getprop('/sim/time/elapsed-sec') - me.AsSwitchCOM_pushed; |
|
28 |
if (pressed > 2) { |
|
29 |
setprop('/instrumentation/comm/frequencies/selected-mhz', 121.500); |
|
30 |
setprop('/instrumentation/zkv1000/radios/comm1-selected', 1); |
|
31 |
setprop('/instrumentation/zkv1000/radios/comm2-selected', 0); |
|
32 |
} |
|
33 |
else { |
|
34 |
var c = getprop('/instrumentation/zkv1000/radios/comm-tune'); |
|
35 |
var tmp = getprop('/instrumentation/comm[' ~ c ~ ']/frequencies/selected-mhz'); |
|
36 |
setprop('/instrumentation/comm[' ~ c ~ ']/frequencies/selected-mhz', getprop('/instrumentation/comm[' ~ c ~ ']/frequencies/standby-mhz')); |
|
37 |
setprop('/instrumentation/comm[' ~ c ~ ']/frequencies/standby-mhz', tmp); |
|
38 |
} |
|
commit initial
|
39 |
} |
40 |
}, |
|
41 | ||
ajout de l'animation des bou...
|
42 |
ALT : func () { |
43 |
var alt = getprop('instrumentation/altimeter/indicated-altitude-ft'); |
|
44 |
setprop('/instrumentation/zkv1000/afcs/selected-alt-ft', math.round(alt, 10)); |
|
commit initial
|
45 |
}, |
46 | ||
47 |
DirectTo : void, |
|
48 |
MENU : void, |
|
49 |
FPL : void, |
|
50 |
PROC : void, |
|
51 |
CLR : void, |
|
52 |
ENT : void, |
|
53 |
FMS : void, |
|
54 |
}; |