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); |
|
add V-speeds bugs
|
86 |
m.data = {}; |
87 |
foreach (var v; ['Vx', 'Vy', 'Vr', 'Vglide']) { |
|
88 |
m.data[v] = alerts.getNode(v).getValue(); |
|
89 |
m.data[v ~ '-visible'] = 1; |
|
90 |
} |
|
pass device pointer to displ...
|
91 |
m.display = displayClass.new(m, m.role); |
commit initial
|
92 |
m.display.showInitProgress(m.role); |
softkeys are available now
|
93 |
m.softkeys = softkeysClass.new(m, m.node, m.role); |
XPDR settings via knob or so...
|
94 |
m.buttons = buttonsClass.new(m.node); |
95 |
m.knobs = knobsClass.new(m); |
|
commit initial
|
96 |
m.display.loadsvg(); |
AI disponible
|
97 |
m.display.loadGroup({ |
98 |
hide : [ |
|
commit initial
|
99 |
'Failures', |
100 |
'SoftKeysTexts', |
|
101 |
'PFD-Widgets', |
|
102 |
'COMM', |
|
103 |
'XPDR-TIME', |
|
104 |
'NAV', |
|
105 |
'FlightInstruments', |
|
106 |
'VDI', |
|
107 |
'OMI', |
|
AI disponible
|
108 |
], |
109 |
clip : 'PitchScale', |
|
110 |
}); |
|
TMR/REF window
|
111 |
m.windows = pageClass.new(m); |
commit initial
|
112 |
zkv.getNode(m.role ~ 'init').setIntValue(0); |
new var organistaion (and fi...
|
113 |
setprop('/instrumentation/zkv1000/' ~ m.role ~ '/status', 1); |
PFD+MFD allumés ensemble
|
114 |
msg(m.role ~ ' switched on!'); |
commit initial
|
115 |
return m; |
116 |
}, |
|
117 |
}; |
|
118 | ||
PFD+MFD allumés ensemble
|
119 |
var powerOn = func { |
new var organistaion (and fi...
|
120 |
foreach (var role; ['PFD', 'MFD']) |
121 |
if (zkv.getNode(role) != nil) |
|
122 |
# thread.newthread(func { |
|
123 |
zkv1000[role] = deviceClass.new(role); |
|
124 |
# }); |
|
correction listeners
|
125 |
settimer(setListeners, 5); |
commit initial
|
126 |
} |