From 859fb8cbba49993342fc2df6eb2f28d2f9f07721 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Fri, 6 Apr 2018 15:45:09 +0100 Subject: [PATCH 1/2] bugfix --- Nasal/electrical.nas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Nasal/electrical.nas b/Nasal/electrical.nas index 4ab88759..0c2fbf16 100644 --- a/Nasal/electrical.nas +++ b/Nasal/electrical.nas @@ -758,7 +758,7 @@ var ELEC = { foreach(var lighta; lights) { power_consumption = lighta.power_consumption(); - if (getprop(screena.elec_prop) != 0 and getprop(lighta.control_prop) != 0) { + if (getprop(lighta.elec_prop) != 0 and getprop(lighta.control_prop) != 0) { setprop("/systems/electrical/light/" ~ lighta.name ~ "/watts", power_consumption); } else { setprop("/systems/electrical/light/" ~ lighta.name ~ "/watts", 0); From 67b2860e7b44b8b2047b306776bf682023bc3384 Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Sun, 8 Apr 2018 09:13:46 -0400 Subject: [PATCH 2/2] MCDU: Fix allowing input of out-of-range CI --- Nasal/MCDU1/INITA.nas | 2 +- Nasal/MCDU1/PERFCLB.nas | 2 +- Nasal/MCDU2/INITA.nas | 2 +- Nasal/MCDU2/PERFCLB.nas | 2 +- revision.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Nasal/MCDU1/INITA.nas b/Nasal/MCDU1/INITA.nas index 488a4b27..6413d6e2 100644 --- a/Nasal/MCDU1/INITA.nas +++ b/Nasal/MCDU1/INITA.nas @@ -42,7 +42,7 @@ var initInputA = func(key) { } setprop("/MCDU[0]/scratchpad-msg", "1"); setprop("/MCDU[0]/scratchpad", "NOT ALLOWED"); - } else if (ci >= 0 and ci <= 999) { + } else if (ci >= 0 and ci <= 120) { setprop("/FMGC/internal/cost-index", ci); setprop("/FMGC/internal/cost-index-set", 1); setprop("/MCDU[0]/scratchpad", ""); diff --git a/Nasal/MCDU1/PERFCLB.nas b/Nasal/MCDU1/PERFCLB.nas index 4d0f9985..e355a55a 100644 --- a/Nasal/MCDU1/PERFCLB.nas +++ b/Nasal/MCDU1/PERFCLB.nas @@ -22,7 +22,7 @@ var perfCLBInput = func(key) { } setprop("/MCDU[0]/scratchpad-msg", "1"); setprop("/MCDU[0]/scratchpad", "NOT ALLOWED"); - } else if (ci >= 0 and ci <= 999) { + } else if (ci >= 0 and ci <= 120) { setprop("/FMGC/internal/cost-index", ci); setprop("/FMGC/internal/cost-index-set", 1); setprop("/MCDU[0]/scratchpad", ""); diff --git a/Nasal/MCDU2/INITA.nas b/Nasal/MCDU2/INITA.nas index 3c546451..93c4eba9 100644 --- a/Nasal/MCDU2/INITA.nas +++ b/Nasal/MCDU2/INITA.nas @@ -42,7 +42,7 @@ var initInputA = func(key) { } setprop("/MCDU[1]/scratchpad-msg", "1"); setprop("/MCDU[1]/scratchpad", "NOT ALLOWED"); - } else if (ci >= 0 and ci <= 999) { + } else if (ci >= 0 and ci <= 120) { setprop("/FMGC/internal/cost-index", ci); setprop("/FMGC/internal/cost-index-set", 1); setprop("/MCDU[1]/scratchpad", ""); diff --git a/Nasal/MCDU2/PERFCLB.nas b/Nasal/MCDU2/PERFCLB.nas index 1a4c8c46..96ec78df 100644 --- a/Nasal/MCDU2/PERFCLB.nas +++ b/Nasal/MCDU2/PERFCLB.nas @@ -22,7 +22,7 @@ var perfCLBInput = func(key) { } setprop("/MCDU[1]/scratchpad-msg", "1"); setprop("/MCDU[1]/scratchpad", "NOT ALLOWED"); - } else if (ci >= 0 and ci <= 999) { + } else if (ci >= 0 and ci <= 120) { setprop("/FMGC/internal/cost-index", ci); setprop("/FMGC/internal/cost-index-set", 1); setprop("/MCDU[1]/scratchpad", ""); diff --git a/revision.txt b/revision.txt index ae43bea8..24db3756 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -4322 \ No newline at end of file +4323 \ No newline at end of file