From 2ecfd0e8e2b081fc39fad1e36d7e9b8004847395 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Fri, 1 Nov 2019 10:59:18 +0000 Subject: [PATCH] Fix Mapstructure error --- .../ND/canvas/map/WPT-airbus.lcontroller | 2 +- Nasal/ECAM/ECAM-controller.nas | 18 +++++++++--------- Nasal/ECAM/ECAM-phases.nas | 9 ++------- Nasal/libraries.nas | 9 +-------- 4 files changed, 13 insertions(+), 25 deletions(-) diff --git a/Models/Instruments/ND/canvas/map/WPT-airbus.lcontroller b/Models/Instruments/ND/canvas/map/WPT-airbus.lcontroller index a91f8d3f..2ca8d845 100644 --- a/Models/Instruments/ND/canvas/map/WPT-airbus.lcontroller +++ b/Models/Instruments/ND/canvas/map/WPT-airbus.lcontroller @@ -19,7 +19,7 @@ canvas.SymbolLayer.add(name, { .close() .setStrokeLineWidth(3) .setColor(1,1,1) - .setScale(1); + .setScale(1,1); }, vor_symbol: 'Nasal/canvas/map/Airbus/Images/airbus_vor.svg', airport_symbol: 'Nasal/canvas/map/Airbus/Images/airbus_airport.svg', diff --git a/Nasal/ECAM/ECAM-controller.nas b/Nasal/ECAM/ECAM-controller.nas index 431e936c..a5cdec2c 100644 --- a/Nasal/ECAM/ECAM-controller.nas +++ b/Nasal/ECAM/ECAM-controller.nas @@ -182,18 +182,18 @@ var ECAM_controller = { rightLines[n].setValue(""); } - if (getprop("/systems/acconfig/autoconfig-running")) { return; } - # write to ECAM var counter = 0; - foreach (var w; warnings.vector) { - if (counter >= 9) { break; } - if (w.active == 1) { - w.write(); - w.warnlight(); - w.sound(); - counter += 1; + if (!getprop("/systems/acconfig/autoconfig-running")) { + foreach (var w; warnings.vector) { + if (counter >= 9) { break; } + if (w.active == 1) { + w.write(); + w.warnlight(); + w.sound(); + counter += 1; + } } } diff --git a/Nasal/ECAM/ECAM-phases.nas b/Nasal/ECAM/ECAM-phases.nas index bdfc3b36..2f240491 100644 --- a/Nasal/ECAM/ECAM-phases.nas +++ b/Nasal/ECAM/ECAM-phases.nas @@ -85,6 +85,8 @@ var phaseLoop = func() { master1 = pts.Controls.Engines.Engine1.cutoffSw.getBoolValue(); master2 = pts.Controls.Engines.Engine2.cutoffSw.getBoolValue(); + FWC.Flipflop.recallReset.setValue(0); + # Various things if (gear_agl < 5) { FWC.Flipflop.gearSet.setBoolValue(1); @@ -265,13 +267,6 @@ var setPhase = func(newPhase) { if (newPhase >= 1 and newPhase <= 10 and _lastPhase != newPhase) { pts.ECAM.fwcWarningPhase.setValue(newPhase); FWC.Flipflop.recallReset.setValue(1); - settimer(func() { - if (FWC.Flipflop.recallReset.getValue() == 1) { # catch unexpected error, trying something new here - FWC.Flipflop.recallReset.setValue(0); - } else { - die("Exception in ECAM-phases.nas, line 271"); - } - }, 0.1); _lastPhase = newPhase; } } diff --git a/Nasal/libraries.nas b/Nasal/libraries.nas index 774b751a..9158ec43 100644 --- a/Nasal/libraries.nas +++ b/Nasal/libraries.nas @@ -312,14 +312,7 @@ canvas.Element.setVisible = func(vis) { me._lastVisible = vis; me.setBool("visible", vis); }; -canvas.Element._lastX = nil; -canvas.Element._lastY = nil; -canvas.Element.setScale = func(x, y) { - if (x == me._lastX and y == me._lastY) {return me;} - me._lastX = x; - me._lastY = y; - me.setScale(x, y); -}; + # In air, flaps 1 is slats only. On ground, it is slats and flaps.