commit initial
|
1 |
var buttonsClass = { |
improves role/name variables...
|
2 |
new : func (device) { |
commit initial
|
3 |
var m = { parents: [ buttonsClass ] }; |
improves role/name variables...
|
4 |
m.device = device; |
commit initial
|
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); |
|
creates flightdeck hash to p...
|
16 |
foreach (var c; keys(flightdeck)) |
17 |
if (contains(flightdeck[c], 'display')) |
|
18 |
flightdeck[c].display.updateNAV({refresh: n+1}); |
|
commit initial
|
19 |
}, |
20 | ||
ajout de l'animation des bou...
|
21 |
AsSwitchCOM : func (x) { |
commit initial
|
22 |
if (x) { |
ajout de l'animation des bou...
|
23 |
me.AsSwitchCOM_pushed = getprop('/sim/time/elapsed-sec'); |
commit initial
|
24 |
} |
ajout de l'animation des bou...
|
25 |
else { |
26 |
var pressed = getprop('/sim/time/elapsed-sec') - me.AsSwitchCOM_pushed; |
|
27 |
if (pressed > 2) { |
|
28 |
setprop('/instrumentation/comm/frequencies/selected-mhz', 121.500); |
|
29 |
setprop('/instrumentation/zkv1000/radios/comm1-selected', 1); |
|
30 |
setprop('/instrumentation/zkv1000/radios/comm2-selected', 0); |
|
fix COMM display standby fre...
|
31 |
foreach (var d; keys(flightdeck)) |
32 |
if (contains(flightdeck[d], 'display')) { |
|
33 |
flightdeck[d].display.updateCOMM({refresh: 1}); |
|
34 |
flightdeck[d].display.updateCOMM({refresh: 2}); |
|
35 |
} |
|
ajout de l'animation des bou...
|
36 |
} |
37 |
else { |
|
38 |
var c = getprop('/instrumentation/zkv1000/radios/comm-tune'); |
|
39 |
var tmp = getprop('/instrumentation/comm[' ~ c ~ ']/frequencies/selected-mhz'); |
|
40 |
setprop('/instrumentation/comm[' ~ c ~ ']/frequencies/selected-mhz', getprop('/instrumentation/comm[' ~ c ~ ']/frequencies/standby-mhz')); |
|
41 |
setprop('/instrumentation/comm[' ~ c ~ ']/frequencies/standby-mhz', tmp); |
|
fix COMM display standby fre...
|
42 |
foreach (var d; keys(flightdeck)) |
43 |
if (contains(flightdeck[d], 'display')) |
|
44 |
flightdeck[d].display.updateCOMM({refresh: c+1}); |
|
ajout de l'animation des bou...
|
45 |
} |
commit initial
|
46 |
} |
47 |
}, |
|
48 | ||
ajout de l'animation des bou...
|
49 |
ALT : func () { |
50 |
var alt = getprop('instrumentation/altimeter/indicated-altitude-ft'); |
|
51 |
setprop('/instrumentation/zkv1000/afcs/selected-alt-ft', math.round(alt, 10)); |
|
commit initial
|
52 |
}, |
53 | ||
54 |
DirectTo : void, |
|
55 |
MENU : void, |
|
56 |
FPL : void, |
|
57 |
PROC : void, |
|
58 |
CLR : void, |
|
59 |
ENT : void, |
|
60 |
FMS : void, |
|
61 |
}; |