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); |
|
16 |
}, |
|
17 | ||
ajout de l'animation des bou...
|
18 |
AsSwitchCOM : func (x) { |
commit initial
|
19 |
if (x) { |
ajout de l'animation des bou...
|
20 |
me.AsSwitchCOM_pushed = getprop('/sim/time/elapsed-sec'); |
commit initial
|
21 |
} |
ajout de l'animation des bou...
|
22 |
else { |
23 |
var pressed = getprop('/sim/time/elapsed-sec') - me.AsSwitchCOM_pushed; |
|
24 |
if (pressed > 2) { |
|
25 |
setprop('/instrumentation/comm/frequencies/selected-mhz', 121.500); |
|
26 |
setprop('/instrumentation/zkv1000/radios/comm1-selected', 1); |
|
27 |
setprop('/instrumentation/zkv1000/radios/comm2-selected', 0); |
|
28 |
} |
|
29 |
else { |
|
30 |
var c = getprop('/instrumentation/zkv1000/radios/comm-tune'); |
|
31 |
var tmp = getprop('/instrumentation/comm[' ~ c ~ ']/frequencies/selected-mhz'); |
|
32 |
setprop('/instrumentation/comm[' ~ c ~ ']/frequencies/selected-mhz', getprop('/instrumentation/comm[' ~ c ~ ']/frequencies/standby-mhz')); |
|
33 |
setprop('/instrumentation/comm[' ~ c ~ ']/frequencies/standby-mhz', tmp); |
|
34 |
} |
|
commit initial
|
35 |
} |
36 |
}, |
|
37 | ||
ajout de l'animation des bou...
|
38 |
ALT : func () { |
39 |
var alt = getprop('instrumentation/altimeter/indicated-altitude-ft'); |
|
40 |
setprop('/instrumentation/zkv1000/afcs/selected-alt-ft', math.round(alt, 10)); |
|
commit initial
|
41 |
}, |
42 | ||
43 |
DirectTo : void, |
|
44 |
MENU : void, |
|
45 |
FPL : void, |
|
46 |
PROC : void, |
|
47 |
CLR : void, |
|
48 |
ENT : void, |
|
49 |
FMS : void, |
|
50 |
}; |