zkv1000 / Nasal / afcs.nas /
Newer Older
410 lines | 18.895kb
add vim zip-markers
Sébastien MARQUE authored on 2023-08-05
1
# vim: set foldmethod=marker foldmarker={{{,}}} :
adds AFCS
Sébastien MARQUE authored on 2020-05-06
2
var APClass = {
3
    new : func {
4
        var m = { parents: [ APClass ] };
5

            
6
        m.system = 'none';
7
        var ap_systems = { # described AP systems to search, if it returns true system is set
autopilot S-TEC 55X integrat...
Sébastien MARQUE authored on 2020-05-06
8
            STEC55X: func contains(stec55x, 'ITAF'),
creates entry point for GFC7...
Sébastien MARQUE authored on 2020-05-16
9
            GFC700: func props.globals.getNode('/autopilot/GFC700/FSM/lateral').getPath(),
add KAP140 to afcs
Sébastien MARQUE authored on 2021-03-24
10
            KAP140: func contains(kap140, 'apButton'),
adds AFCS
Sébastien MARQUE authored on 2020-05-06
11
        };
12
        foreach (var s; sort(keys(ap_systems), func(a,b) cmp(a,b))) {
13
            call(ap_systems[s], [], nil, nil, var errors = []);
14
            if (!size(errors)) {
15
                msg('found autopilot system: ' ~ s);
16
                m.system = s;
17
                break;
18
            }
19
        }
add message if no autopilot ...
Sébastien MARQUE authored on 2023-08-05
20
        if (m.system == 'none')
21
            msg('no autopilot system found');
adds AFCS
Sébastien MARQUE authored on 2020-05-06
22

            
23
        m.engaged = 0;
24

            
25
        if (! contains(data.timers, 'updateAP')) {
26
            data.timers.updateAP = maketimer(1, m, m.systems[m.system].updateDisplay);
27
            data.timers.updateAP.start();
28
        }
29

            
autopilot status with separa...
Sébastien MARQUE authored on 2020-05-08
30
        var ap_annun = [
31
            'LATMOD-Armed-text',  'LATMOD-Active-text',
32
            'AP-Status-text',     'YD-Status-text',
33
            'VERMOD-Active-text', 'VERMOD-Reference-text', 'VERMOD-Armed-text'
34
        ];
show AP infos on MFDs if the...
Sébastien MARQUE authored on 2021-03-22
35

            
36
        var terminal_count = { PFD: 0, MFD: 0 };
37
        m.terminals = [];
38
        foreach (var name; keys(flightdeck)) {
39
            terminal_count[flightdeck[name].role] += 1;
40
            if (flightdeck[name].role == 'PFD')
41
                append(m.terminals, name);
42
        }
43

            
44
        if (terminal_count.PFD == 0 and terminal_count.MFD > 0) {
45
            foreach (var name; keys(flightdeck)) {
fix AP visibility on MFD
Sébastien MARQUE authored on 2021-03-28
46
                flightdeck[name].display.loadGroup({show: 'PFD-navbox'});
show AP infos on MFDs if the...
Sébastien MARQUE authored on 2021-03-22
47
                if (flightdeck[name].role == 'MFD') {
48
                    append(m.terminals, name);
49
                    flightdeck[name].display.loadGroup({text: ap_annun});
50
                }
51
            }
52
        }
53

            
54
        foreach (var terminal; m.terminals) {
55
            foreach (var elem; ap_annun) {
56
                var color = (elem == 'LATMOD-Armed-text' or elem == 'VERMOD-Armed-text') ? 'white' : 'green';
57
                flightdeck[terminal].display.screenElements[elem]
58
                    .setColor(flightdeck[terminal].display.colors[color])
59
                    .setVisible(0);
60
            }
61
            foreach (var ap; [ 'AP', 'YD' ])
62
                flightdeck[terminal].display.screenElements[ap ~ '-Status-text']
63
                    .setDrawMode(canvas.Text.TEXT + canvas.Text.FILLEDBOUNDINGBOX)
64
                    .setColorFill(flightdeck[terminal].display.colors.black)
65
                    .setText(ap);
autopilot status with separa...
Sébastien MARQUE authored on 2020-05-08
66
        }
67

            
68
        ap_annun = nil;
69
        ap_systems = nil;
show AP infos on MFDs if the...
Sébastien MARQUE authored on 2021-03-22
70
        terminal_count = nil;
delete unused afcs systems
Sébastien MARQUE authored on 2020-05-16
71
        # delete unused systems
72
        foreach (var e; keys(m.systems))
73
            if (e != m.system)
74
                delete(m.systems, e);
autopilot status with separa...
Sébastien MARQUE authored on 2020-05-08
75

            
adds AFCS
Sébastien MARQUE authored on 2020-05-06
76
        if (contains(m.systems[m.system], 'hook') and typeof(m.systems[m.system].hook) == 'func')
show AP infos on MFDs if the...
Sébastien MARQUE authored on 2021-03-22
77
            m.systems[m.system].hook();
adds AFCS
Sébastien MARQUE authored on 2020-05-06
78

            
79
        return m;
80
    },
81
    softkey: func (side, row, a) {
little fixes
Sébastien MARQUE authored on 2020-05-11
82
        if (a)
adds AFCS
Sébastien MARQUE authored on 2020-05-06
83
            return;
afcs improvements
Sébastien MARQUE authored on 2020-05-17
84
        call(me.systems[me.system][side][row], [], autopilot.parents[0].systems[me.system]);
adds AFCS
Sébastien MARQUE authored on 2020-05-06
85
    },
86
    systems : {
87
        # L: AP FD  NAV ALT VS FLC
88
        # R: YD HDG APR VNV UP DN
89
        none: {
90
            updateDisplay: func,
91
            hook: func,
92
            L: [ func, func, func, func, func, func ],
93
            R: [ func, func, func, func, func, func ],
94
        },
creates entry point for GFC7...
Sébastien MARQUE authored on 2020-05-16
95
        GFC700: {
add vim zip-markers
Sébastien MARQUE authored on 2023-08-05
96
# {{{
integration of GFC700 capabi...
Sébastien MARQUE authored on 2020-05-17
97
# Many thanks to the great work on the FG1000
98
            _blink_count: 0,
99
            updateDisplay: func {
improve and fix afcs for mul...
Sébastien MARQUE authored on 2021-03-24
100
                var annunciator = props.globals.getNode('/autopilot/annunciator');
101
                var ap_enabled  = annunciator.getValue('autopilot-enabled');
102

            
103
                var latmod         = annunciator.getValue('lateral-mode');
104
                var latmod_armed   = annunciator.getValue('lateral-mode-armed');
105
                var vertmod        = annunciator.getValue('vertical-mode');
106
                var vertmod_armed  = annunciator.getValue('vertical-mode-armed');
107
                var vertmod_target = annunciator.getValue('vertical-mode-target');
108
                if (vertmod_target != nil) {
109
                    vertmod_target = string.replace(vertmod_target, '+', utf8.chstr(9650));
110
                    vertmod_target = string.replace(vertmod_target, '-', utf8.chstr(9660));
111
                }
show AP infos on MFDs if the...
Sébastien MARQUE authored on 2021-03-22
112
                foreach (var terminal; me.terminals) {
113
                    var se = flightdeck[terminal].display.screenElements;
integration of GFC700 capabi...
Sébastien MARQUE authored on 2020-05-17
114

            
show AP infos on MFDs if the...
Sébastien MARQUE authored on 2021-03-22
115
                    se['LATMOD-Active-text'].setVisible(latmod != nil and ap_enabled).setText(latmod);
116
                    se['LATMOD-Armed-text'].setVisible(latmod_armed != nil and ap_enabled).setText(latmod_armed);
117
                    se['VERMOD-Active-text'].setVisible(vertmod != nil and ap_enabled).setText(vertmod);
118
                    se['VERMOD-Reference-text'].setVisible(vertmod_target != nil and ap_enabled).setText(vertmod_target);
119
                    se['VERMOD-Armed-text'].setVisible(vertmod_armed != nil and ap_enabled).setText(vertmod_armed);
120

            
121
                    if (se['AP-Status-text'].getVisible() and !ap_enabled) {
122
                        if (math.mod(me._blink_count,2))
123
                            se['AP-Status-text']
124
                                .setDrawMode(canvas.Text.TEXT + canvas.Text.FILLEDBOUNDINGBOX)
125
                                .setColorFill(flightdeck[terminal].display.colors.yellow)
126
                                .setColor(flightdeck[terminal].display.colors.black);
127
                        else
128
                            se['AP-Status-text']
129
                                .setDrawMode(canvas.Text.TEXT + canvas.Text.FILLEDBOUNDINGBOX)
130
                                .setColorFill(flightdeck[terminal].display.colors.black)
131
                                .setColor(flightdeck[terminal].display.colors.yellow);
132
                        me._blink_count += 1;
133
                        if (me._blink_count == 5) {
134
                            se['AP-Status-text']
135
                                .setColor(flightdeck[terminal].display.colors.green)
136
                                .setVisible(0);
137
                            me._blink_count = 0;
138
                        }
139
                        return;
140
                    }
141
                    else {
142
                        se['AP-Status-text'].setVisible(ap_enabled);
integration of GFC700 capabi...
Sébastien MARQUE authored on 2020-05-17
143
                        me._blink_count = 0;
144
                    }
145
                }
146
            },
147
            hook: func {
148
                me._vertical_mode = globals.props.getNode("/autopilot/annunciator/vertical-mode", 1);
149
                me._pitch_setting = globals.props.getNode("/autopilot/settings/target-pitch-deg", 1);
150
                me._climb_setting = globals.props.getNode("/autopilot/settings/vertical-speed-fpm", 1);
151
                me._speed_setting = globals.props.getNode("/autopilot/settings/target-speed-kt", 1);
152
                me._vertical_mode_button = globals.props.getNode("/autopilot/vertical-mode-button", 1);
153
                me._lateral_mode_button = globals.props.getNode("/autopilot/lateral-mode-button", 1);
154
                me._ap_mode_button = globals.props.getNode("/autopilot/AP-mode-button", 1);
155
                me._ap_enabled = globals.props.getNode("/autopilot/annunciator/autopilot-enabled", 1);;
156
                me._fd_enabled = globals.props.getNode("/autopilot/annunciator/flight-director-enabled", 1);;
157

            
158
            },
159
            sendModeChange: func (value) {
160
                me._vertical_mode_button.setValue(value);
161
                me._lateral_mode_button.setValue(value);
162
                if (value == "AP") {
163
                    me._ap_mode_button.setValue(value);
164
                }
165
            },
166
            handleNoseUpDown : func(value) {
167
                var vertical_mode = me._vertical_mode.getValue();
168

            
169
                if (vertical_mode == "PIT")
170
                    me._pitch_setting.setValue(me._pitch_setting.getValue() + (value * 1));
171

            
172
                if (vertical_mode == "VS") {
173
                    me._climb_setting.setValue(me._climb_setting.getValue() + (value * 100));
174
                    setprop("/autopilot/annunciator/vertical-mode-target",
175
                        sprintf("%+ifpm", me._climb_setting.getValue())
176
                    );
177
                }
178

            
179
                if (vertical_mode == "FLC") {
180
                    me._speed_setting.setValue(me._speed_setting.getValue() - (value * 1));
181
                    setprop("/autopilot/annunciator/vertical-mode-target",
182
                        sprintf("%i kt", me._speed_setting.getValue())
183
                    );
184
                }
185
            },
nothing interesting
Sébastien MARQUE authored on 2020-05-17
186
            L: [
integration of GFC700 capabi...
Sébastien MARQUE authored on 2020-05-17
187
               func { me.sendModeChange('AP');  },
188
               func { me.sendModeChange('FD');  },
fix issue with AP/NAV
Sébastien MARQUE authored on 2020-09-27
189
               func { setprop('/autopilot/settings/nav-mode-source', cdi.getValue('source')); me.sendModeChange('NAV'); },
integration of GFC700 capabi...
Sébastien MARQUE authored on 2020-05-17
190
               func { me.sendModeChange('ALT'); },
191
               func { me.sendModeChange('VS');  },
192
               func { me.sendModeChange('FLC'); },
193
            ],
nothing interesting
Sébastien MARQUE authored on 2020-05-17
194
            R: [
integration of GFC700 capabi...
Sébastien MARQUE authored on 2020-05-17
195
               func { me.sendModeChange('YD');  },
196
               func { me.sendModeChange('HDG'); },
197
               func { me.sendModeChange('APR'); },
198
               func { me.sendModeChange('VNV'); },
199
               func { me.handleNoseUpDown(1);   },
200
               func { me.handleNoseUpDown(-1);  },
201
            ],
creates entry point for GFC7...
Sébastien MARQUE authored on 2020-05-16
202
        },
add vim zip-markers
Sébastien MARQUE authored on 2023-08-05
203
# }}}
autopilot S-TEC 55X integrat...
Sébastien MARQUE authored on 2020-05-06
204
        STEC55X: {
add vim zip-markers
Sébastien MARQUE authored on 2023-08-05
205
# {{{
code more clear
Sébastien MARQUE authored on 2020-05-16
206
            _aliases: {
207
                hdg:          afcs.getNode('heading-bug-deg'),
208
                NAVCourse:    cdi.getNode('course'),
209
                OBSNAVNeedle: cdi.getNode('course-deflection'),
210
            },
improve S-TEC55X support
Sébastien MARQUE authored on 2023-08-06
211
            ap_annun_color: {
212
                rdy: "white",
213
                fail: "red",
214
            },
autopilot status with separa...
Sébastien MARQUE authored on 2020-05-08
215
            hook : func {
216
                me.trimTarget = 0;
code more clear
Sébastien MARQUE authored on 2020-05-16
217
                foreach (var a; keys(me._aliases)) stec55x[a].alias(me._aliases[a]);
stec55x integration (suite)
Sébastien MARQUE authored on 2020-05-11
218
                setprop('/it-stec55x/input/ap-master-sw', 1);
autopilot status with separa...
Sébastien MARQUE authored on 2020-05-08
219
            },
autopilot S-TEC 55X integrat...
Sébastien MARQUE authored on 2020-05-06
220
            updateDisplay: func {
improve the display of the S...
Sébastien MARQUE authored on 2023-08-08
221
                var vert_armed     = '';
222
                var vert_active    = '';
223
                var vert_reference = '';
improve S-TEC55X support
Sébastien MARQUE authored on 2023-08-06
224
                if (stec55x.ALT_annun.getBoolValue()) {
improve the display of the S...
Sébastien MARQUE authored on 2023-08-08
225
                    vert_active    = 'ALT';
226
                    vert_reference = sprintf('%.2f inHg', stec55x.alt.getValue());
227
                    vert_armed     = sprintf('%5d ft', abs(data.alt - afcs.getValue('selected-alt-ft')) < 150 ? afcs.getValue('selected-alt-ft') : math.round(data.alt, 10));
improve and fix afcs for mul...
Sébastien MARQUE authored on 2021-03-24
228
                }
improve S-TEC55X support
Sébastien MARQUE authored on 2023-08-06
229
                elsif (stec55x.VS_annun.getBoolValue()) {
improve the display of the S...
Sébastien MARQUE authored on 2023-08-08
230
                    vert_active    = 'VS';
231
                    vert_reference = sprintf('%s%4d fpm',
improve S-TEC55X support
Sébastien MARQUE authored on 2023-08-06
232
                                    utf8.chstr(stec55x.vs.getValue() > 0 ? 9650 : 9660),
233
                                    math.abs(math.round(stec55x.vs.getValue(), 10)));
234
                }
235
                elsif (stec55x.GSArmed.getBoolValue()) {
improve the display of the S...
Sébastien MARQUE authored on 2023-08-08
236
                    vert_armed  = 'GS';
237
                    vert_active = 'VPATH';
improve S-TEC55X support
Sébastien MARQUE authored on 2023-08-06
238
                }
239

            
240
                var ap_state = [];
241
                if (stec55x.RDY_annun.getBoolValue())
242
                    ap_state = ["RDY", "white", "black"];
243
                elsif (stec55x.FAIL_annun.getBoolValue())
244
                    ap_state = ["FAIL", "black", "red"];
245
                elsif (stec55x.systemAlive.getBoolValue())
246
                    ap_state = ["AP", "black", "green"];
247
                else
248
                    ap_state = ["", "black", "black"];
improve and fix afcs for mul...
Sébastien MARQUE authored on 2021-03-24
249

            
improve the display of the S...
Sébastien MARQUE authored on 2023-08-08
250
                var lat_active = '';
251
                foreach (var m; ['HDG', 'NAV', 'APR'])
252
                    if (stec55x[m ~ "_annun"].getBoolValue()) {
253
                        lat_active = m;
254
                        break;
255
                    }
256

            
improve and fix afcs for mul...
Sébastien MARQUE authored on 2021-03-24
257
                foreach (var terminal; me.terminals) {
it-stec55x: fix error on dis...
Sébastien MARQUE authored on 2023-08-05
258
                    var se = flightdeck[terminal].display.screenElements;
improve the display of the S...
Sébastien MARQUE authored on 2023-08-08
259
                    se['VERMOD-Active-text'].setVisible(size(vert_active)).setText(vert_active);
260
                    se['VERMOD-Armed-text'].setVisible(size(vert_armed)).setText(vert_armed);
261
                    se['VERMOD-Reference-text'].setVisible(size(vert_reference)).setText(vert_reference);
improve S-TEC55X support
Sébastien MARQUE authored on 2023-08-06
262
                    se['AP-Status-text'].setColorFill(flightdeck[terminal].display.colors[ap_state[2]])
263
                                        .setColor(ap_state[1])
264
                                        .setVisible(size(ap_state[0]))
265
                                        .setText(ap_state[0]);
improve and fix afcs for mul...
Sébastien MARQUE authored on 2021-03-24
266
                    se['YD-Status-text'].setVisible(stec55x.yaw.getValue() != -1);
improve the display of the S...
Sébastien MARQUE authored on 2023-08-08
267
                    se['LATMOD-Active-text'].setVisible(size(lat_active)).setText(lat_active);
autopilot status with separa...
Sébastien MARQUE authored on 2020-05-08
268
                }
improve and fix afcs for mul...
Sébastien MARQUE authored on 2021-03-24
269

            
autopilot S-TEC 55X integrat...
Sébastien MARQUE authored on 2020-05-06
270
            },
271
            L: [
272
                func {
improve S-TEC55X support
Sébastien MARQUE authored on 2023-08-06
273
                    var ap_master_sw = '/it-stec55x/input/ap-master-sw';
274
                    setprop(ap_master_sw, !getprop(ap_master_sw));
275
                },
276
                func {
277
                    var apfd_master_sw = '/it-stec55x/input/apfd-master-sw';
278
                    setprop(apfd_master_sw, !getprop(apfd_master_sw));
autopilot S-TEC 55X integrat...
Sébastien MARQUE authored on 2020-05-06
279
                },
280
                func {
let S-TEC55X decide the corr...
Sébastien MARQUE authored on 2023-08-08
281
                    call(stec55x.button.NAV, [], nil, stec55x);
autopilot S-TEC 55X integrat...
Sébastien MARQUE authored on 2020-05-06
282
                },
283
                func {
improve S-TEC55X support
Sébastien MARQUE authored on 2023-08-06
284
                    call(stec55x.button.ALT, [], nil, stec55x);
autopilot S-TEC 55X integrat...
Sébastien MARQUE authored on 2020-05-06
285
                },
286
                func {
improve S-TEC55X support
Sébastien MARQUE authored on 2023-08-06
287
                    stec55x.vs.setValue(math.round(data.vsi, 100));
288
                    call(stec55x.button.VS, [], nil, stec55x);
autopilot S-TEC 55X integrat...
Sébastien MARQUE authored on 2020-05-06
289
                },
290
                func,
291
            ],
292
            R: [
293
                func {
improve S-TEC55X support
Sébastien MARQUE authored on 2023-08-06
294
                    var yaw_dumper_sw = '/it-stec55x/input/yaw-damper-sw';
295
                    setprop(yaw_dumper_sw, !getprop(yaw_dumper_sw));
autopilot S-TEC 55X integrat...
Sébastien MARQUE authored on 2020-05-06
296
                },
297
                func {
only HDG roll mode is availa...
Sébastien MARQUE authored on 2020-05-11
298
                    if (stec55x.roll.getValue() == 0)
299
                        stec55x.roll.setValue(-1);
300
                    else
301
                        call(stec55x.button.HDG, [], nil, stec55x);
autopilot S-TEC 55X integrat...
Sébastien MARQUE authored on 2020-05-06
302
                },
303
                func {
improve S-TEC55X support
Sébastien MARQUE authored on 2023-08-06
304
                    call(stec55x.button.APR, [], nil, stec55x);
autopilot S-TEC 55X integrat...
Sébastien MARQUE authored on 2020-05-06
305
                },
306
                func,
307
                func { # UP (trim)
improve S-TEC55X support
Sébastien MARQUE authored on 2023-08-06
308
                    call(stec55x.button.Knob, [1], nil, stec55x);
autopilot S-TEC 55X integrat...
Sébastien MARQUE authored on 2020-05-06
309
                },
310
                func { # DN (trim)
improve S-TEC55X support
Sébastien MARQUE authored on 2023-08-06
311
                    call(func{stec55x.button.Knob(-1)}, [], nil, stec55x);
autopilot S-TEC 55X integrat...
Sébastien MARQUE authored on 2020-05-06
312
                },
313
            ],
add KAP140 to afcs
Sébastien MARQUE authored on 2021-03-24
314
        },
add vim zip-markers
Sébastien MARQUE authored on 2023-08-05
315
# }}}
add KAP140 to afcs
Sébastien MARQUE authored on 2021-03-24
316
        KAP140: {
add vim zip-markers
Sébastien MARQUE authored on 2023-08-05
317
# {{{
add KAP140 to afcs
Sébastien MARQUE authored on 2021-03-24
318
            _blink_count: 0,
319
            updateDisplay: func {
320
                var latmod = latmod_armed = vertmod = vertmod_armed = "";
321
                var vertmod_target = 0;
fix syntax error
Sébastien MARQUE authored on 2021-03-24
322
                var ap_enabled = kap140.lockRollMode.getValue() != kap140.rollModes["OFF"]
323
                              or kap140.lockPitchMode.getValue() != kap140.pitchModes["OFF"];
add KAP140 to afcs
Sébastien MARQUE authored on 2021-03-24
324

            
325
                if (ap_enabled) {
326
                    foreach (var mode; keys(kap140.rollModes))
327
                        if (kap140.lockRollMode.getValue() == kap140.rollModes[mode]) {
328
                            latmod = mode;
329
                            break;
330
                        }
331

            
332
                    foreach (var mode; keys(kap140.rollArmModes))
333
                        if (kap140.lockRollArm.getValue() == kap140.rollArmModes[mode]) {
334
                            latmod_armed = mode;
335
                            break;
336
                        }
337

            
338
                    foreach (var mode; keys(kap140.pitchModes))
339
                        if (kap140.lockPitchMode.getValue() == kap140.pitchModes[mode]) {
340
                            vertmod = mode;
341
                            break;
342
                        }
343

            
344
                    foreach (var mode; keys(kap140.pitchArmModes))
345
                        if (kap140.lockPitchArm.getValue() == kap140.pitchArmModes[mode]) {
346
                            vertmod_armed = mode;
347
                            break;
348
                        }
349

            
350
                    vertmod_target = kap140.settingTargetPressureRate.getValue() * 58000;
fix missing namespace
Sébastien MARQUE authored on 2021-03-28
351
                    if (kap140.lockPitchMode.getValue() == kap140.pitchModes["VS"]
352
                    or kap140.lockPitchArm.getValue() == kap140.pitchArmModes["VS"])
add KAP140 to afcs
Sébastien MARQUE authored on 2021-03-24
353
                        vertmod_target = sprintf('%s%4d fpm',
354
                                utf8.chstr(vertmod_target > 0 ? 9650 : 9660),
355
                                math.abs(math.round(vertmod_target, 10)));
356
                }
357

            
358
                foreach (var terminal; me.terminals) {
359
                    var se = flightdeck[terminal].display.screenElements;
360
                    if (se['AP-Status-text'].getVisible() and !ap_enabled) {
361
                        if (math.mod(me._blink_count,2))
362
                            se['AP-Status-text']
363
                                .setDrawMode(canvas.Text.TEXT + canvas.Text.FILLEDBOUNDINGBOX)
364
                                .setColorFill(flightdeck[terminal].display.colors.yellow)
365
                                .setColor(flightdeck[terminal].display.colors.black);
366
                        else
367
                            se['AP-Status-text']
368
                                .setDrawMode(canvas.Text.TEXT + canvas.Text.FILLEDBOUNDINGBOX)
369
                                .setColorFill(flightdeck[terminal].display.colors.black)
370
                                .setColor(flightdeck[terminal].display.colors.yellow);
371
                        me._blink_count += 1;
372
                        if (me._blink_count == 5) {
373
                            se['AP-Status-text']
374
                                .setColor(flightdeck[terminal].display.colors.green)
375
                                .setVisible(0);
376
                            me._blink_count = 0;
377
                        }
378
                        return;
379
                    }
380
                    else {
381
                        se['AP-Status-text'].setVisible(ap_enabled);
382
                        me._blink_count = 0;
383
                        se['LATMOD-Active-text'].setVisible(ap_enabled).setText(latmod);
384
                        se['LATMOD-Armed-text'].setVisible(ap_enabled).setText(latmod_armed);
385
                        se['VERMOD-Active-text'].setVisible(ap_enabled).setText(vertmod);
386
                        se['VERMOD-Reference-text'].setVisible(ap_enabled).setText(vertmod_target);
387
                        se['VERMOD-Armed-text'].setVisible(ap_enabled).setText(vertmod_armed);
388
                    }
389
                }
390
            },
391
            L: [
392
                func { kap140.apButton(); },
393
                func,
394
                func { kap140.navButton(); },
395
                func { kap140.altButton(); },
396
                func,
397
                func,
398
            ],
399
            R: [
400
                func,
401
                func { kap140.hdgButton(); },
402
                func { kap140.aprButton(); },
403
                func,
404
                func { kap140.upButton(); },
405
                func { kap140.downButton(); }
406
            ],
407
        },
adds AFCS
Sébastien MARQUE authored on 2020-05-06
408
    }
add vim zip-markers
Sébastien MARQUE authored on 2023-08-05
409
# }}}
adds AFCS
Sébastien MARQUE authored on 2020-05-06
410
};