new var organistaion (and fi...
|
1 |
var PFD = nil; |
2 |
var MFD = nil; |
|
commit initial
|
3 | |
NAV disponible (hors CDI)
|
4 |
# les listeners triggent en permanence sur les fréquences... |
5 |
var setListeners = func { |
|
6 |
setlistener('/instrumentation/nav/nav-id', |
|
correction listeners
|
7 |
func (n) { |
8 |
var val = n.getValue(); |
|
new var organistaion (and fi...
|
9 |
if (PFD != nil) |
10 |
PFD.display.updateNAV({'nav-id': 1, val: val}); |
|
11 |
if (MFD != nil) |
|
12 |
MFD.display.updateNAV({'nav-id': 1, val: val}); |
|
NAV disponible (hors CDI)
|
13 |
}, 1, 2); |
14 |
setlistener('/instrumentation/nav[1]/nav-id', |
|
correction listeners
|
15 |
func (n) { |
16 |
var val = n.getValue(); |
|
new var organistaion (and fi...
|
17 |
if (PFD != nil) |
18 |
PFD.display.updateNAV({'nav-id': 2, val: val}); |
|
19 |
if (MFD != nil) |
|
20 |
MFD.display.updateNAV({'nav-id': 2, val: val}); |
|
NAV disponible (hors CDI)
|
21 |
}, 1, 2); |
Correction swap NAV tuning
|
22 |
setlistener('/instrumentation/zkv1000/radios/nav-tune', |
correction listeners
|
23 |
func (n) { |
24 |
var val = n.getValue(); |
|
Correction swap NAV tuning
|
25 |
setNavTune(); |
new var organistaion (and fi...
|
26 |
if (PFD != nil) |
27 |
PFD.display.updateNAV({tune: val}); |
|
28 |
if (MFD != nil) |
|
29 |
MFD.display.updateNAV({tune: val}); |
|
correction listeners
|
30 |
}, 1, 2); |
31 |
setlistener('/instrumentation/zkv1000/radios/comm-tune', |
|
32 |
func (n) { |
|
33 |
var val = n.getValue(); |
|
34 |
setCommTune(); |
|
new var organistaion (and fi...
|
35 |
if (PFD != nil) |
36 |
PFD.display.updateCOMM({tune: val}); |
|
37 |
if (MFD != nil) |
|
38 |
MFD.display.updateCOMM({tune: val}); |
|
Correction swap NAV tuning
|
39 |
}, 1, 2); |
animation HDG bug
|
40 |
setlistener('/instrumentation/zkv1000/afcs/heading-bug-deg', |
41 |
func (n) { |
|
42 |
var val = n.getValue(); |
|
43 |
if (val != nil) { |
|
new var organistaion (and fi...
|
44 |
if (PFD != nil) |
45 |
PFD.display.updateHDG(val); |
|
46 |
if (MFD != nil) |
|
47 |
MFD.display.updateHDG(val); |
|
animation HDG bug
|
48 |
} |
49 |
}, 0, 2); |
|
new var organistaion (and fi...
|
50 |
setlistener('/instrumentation/zkv1000/PFD/knobs/CRS', |
anime CRS
|
51 |
func (n) { |
52 |
var val = n.getValue(); |
|
53 |
if (val != nil) { |
|
new var organistaion (and fi...
|
54 |
if (PFD != nil) |
55 |
PFD.display.updateCRS(); |
|
56 |
if (MFD != nil) |
|
57 |
MFD.display.updateCRS(); |
|
anime CRS
|
58 |
} |
59 |
}, 0, 2); |
|
adds OAT, TAS, GSPD, WindDat...
|
60 |
setlistener('/instrumentation/zkv1000/afcs/selected-alt-ft', |
61 |
func (n) { |
|
62 |
var val = n.getValue(); |
|
new var organistaion (and fi...
|
63 |
if (val != nil and PFD != nil) { |
64 |
if (! PFD.display.screenElements['SelectedALT'].getVisible()) { |
|
65 |
PFD.display.screenElements['SelectedALT'].show(); |
|
66 |
PFD.display.screenElements['SelectedALT-text'].show(); |
|
67 |
PFD.display.screenElements['SelectedALT-symbol'].show(); |
|
68 |
PFD.display.screenElements['SelectedALT-bug'].show(); |
|
69 |
PFD.display.screenElements['SelectedALT-bg'].show(); |
|
fix Selected Altitude displa...
|
70 |
} |
new var organistaion (and fi...
|
71 |
PFD.display.updateSelectedALT(); |
adds OAT, TAS, GSPD, WindDat...
|
72 |
} |
73 |
}, 0, 2); |
|
adds transponder
|
74 |
setlistener('/gear/gear/wow', |
new var organistaion (and fi...
|
75 |
func if (PFD != nil) PFD.display.updateXPDR(), |
adds transponder
|
76 |
0, 0); |
adds BARO settings
|
77 |
setlistener('/instrumentation/altimeter/setting-inhg', |
new var organistaion (and fi...
|
78 |
func if (PFD != nil) PFD.display.updateBARO(), 0, 2); |
NAV disponible (hors CDI)
|
79 |
} |
80 | ||
commit initial
|
81 |
var deviceClass = { |
new var organistaion (and fi...
|
82 |
new: func (role) { |
commit initial
|
83 |
var m = { parents: [ deviceClass ] }; |
new var organistaion (and fi...
|
84 |
m.role = role; |
85 |
m.node = zkv.getNode(role, 1); |
|
pass device pointer to displ...
|
86 |
m.display = displayClass.new(m, m.role); |
commit initial
|
87 |
m.display.showInitProgress(m.role); |
softkeys are available now
|
88 |
m.softkeys = softkeysClass.new(m, m.node, m.role); |
XPDR settings via knob or so...
|
89 |
m.buttons = buttonsClass.new(m.node); |
90 |
m.knobs = knobsClass.new(m); |
|
commit initial
|
91 |
m.display.loadsvg(); |
AI disponible
|
92 |
m.display.loadGroup({ |
93 |
hide : [ |
|
commit initial
|
94 |
'Failures', |
95 |
'SoftKeysTexts', |
|
96 |
'PFD-Widgets', |
|
97 |
'COMM', |
|
98 |
'XPDR-TIME', |
|
99 |
'NAV', |
|
100 |
'FlightInstruments', |
|
101 |
'VDI', |
|
102 |
'OMI', |
|
AI disponible
|
103 |
], |
104 |
clip : 'PitchScale', |
|
105 |
}); |
|
TMR/REF window
|
106 |
m.windows = pageClass.new(m); |
commit initial
|
107 |
zkv.getNode(m.role ~ 'init').setIntValue(0); |
new var organistaion (and fi...
|
108 |
setprop('/instrumentation/zkv1000/' ~ m.role ~ '/status', 1); |
PFD+MFD allumés ensemble
|
109 |
msg(m.role ~ ' switched on!'); |
commit initial
|
110 |
return m; |
111 |
}, |
|
112 |
}; |
|
113 | ||
PFD+MFD allumés ensemble
|
114 |
var powerOn = func { |
new var organistaion (and fi...
|
115 |
foreach (var role; ['PFD', 'MFD']) |
116 |
if (zkv.getNode(role) != nil) |
|
117 |
# thread.newthread(func { |
|
118 |
zkv1000[role] = deviceClass.new(role); |
|
119 |
# }); |
|
correction listeners
|
120 |
settimer(setListeners, 5); |
commit initial
|
121 |
} |