From 8587d55369551e8d4646e5e0dd75aec6566d000b Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Sun, 11 Nov 2018 13:44:59 -0500 Subject: [PATCH] System: Cleanup --- Nasal/ECAM-controller.nas | 12 +++++------- Nasal/ECAM.nas | 1 - revision.txt | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Nasal/ECAM-controller.nas b/Nasal/ECAM-controller.nas index bb43535f..6ca58437 100644 --- a/Nasal/ECAM-controller.nas +++ b/Nasal/ECAM-controller.nas @@ -73,7 +73,6 @@ var warning = { light: "", noRepeat: 0, new: func(msg,active,colour,aural,light,noRepeat) { - var t = {parents:[warning]}; t.msg = msg; @@ -84,7 +83,6 @@ var warning = { t.noRepeat = noRepeat; return t - }, write: func() { var line = 1; @@ -120,7 +118,6 @@ var memo = { active: 0, colour: "", new: func(msg,active,colour) { - var t = {parents:[memo]}; t.msg = msg; @@ -128,7 +125,6 @@ var memo = { t.colour = colour; return t - }, write: func() { var right_line = 1; @@ -260,8 +256,10 @@ var messages_priority_2 = func { park_brk_on.noRepeat = 0; } } + var messages_priority_1 = func {} var messages_priority_0 = func {} + var messages_memo = func { if (getprop("/services/fuel-truck/enable") == 1 and getprop("/ECAM/left-msg") != "TO-MEMO" and getprop("/ECAM/left-msg") != "LDG-MEMO") { refuelg.active = 1; @@ -305,6 +303,7 @@ var messages_memo = func { fob_3T.active = 0; } } + var messages_right_memo = func { if (getprop("/ECAM/warning-phase") >= 3 and getprop("/ECAM/warning-phase") <= 5) { to_inhibit.active = 1; @@ -440,7 +439,6 @@ var messages_right_memo = func { var ECAM_controller = { loop: func() { - # check active messages # config_warnings(); messages_priority_3(); @@ -453,13 +451,13 @@ var ECAM_controller = { # clear display momentarily if (warnings.size() > 0) { - for(var n=1; n<8; n+=1) { + for(var n = 1; n < 8; n += 1) { setprop("/ECAM/msg/line" ~ n, ""); } } if (memos.size() > 0) { - for(var n=1; n<8; n+=1) { + for(var n = 1; n < 8; n += 1) { setprop("/ECAM/rightmsg/line" ~ n, ""); } } diff --git a/Nasal/ECAM.nas b/Nasal/ECAM.nas index d00c2227..9e611bab 100644 --- a/Nasal/ECAM.nas +++ b/Nasal/ECAM.nas @@ -329,7 +329,6 @@ var LowerECAM = { } setprop("/ECAM/Lower/page", "apu"); - } else if (((getprop("/engines/engine[0]/n2-actual") >= 59 or getprop("/engines/engine[1]/n2-actual") >= 59) and getprop("/gear/gear[1]/wow") == 1) or (getprop("/instrumentation/altimeter/indicated-altitude-ft") <= 16000 and getprop("/controls/gear/gear-down") == 1 and getprop("/gear/gear[1]/wow") == 0)) { setprop("/ECAM/Lower/page", "wheel"); diff --git a/revision.txt b/revision.txt index 1b222bd1..0856adc1 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -4699 \ No newline at end of file +4700 \ No newline at end of file