From 90045bfa8a7d0afd66defef08b0c855c20346041 Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Tue, 7 Nov 2017 14:53:52 -0500 Subject: [PATCH] A3XX: Lock INITB when eng running, issue #80 --- Nasal/MCDU1/MCDU.nas | 4 +++- Nasal/MCDU2/MCDU.nas | 4 +++- revision.txt | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Nasal/MCDU1/MCDU.nas b/Nasal/MCDU1/MCDU.nas index dc275d7b..fbccd208 100644 --- a/Nasal/MCDU1/MCDU.nas +++ b/Nasal/MCDU1/MCDU.nas @@ -335,7 +335,9 @@ var arrowbutton = func(btn) { setprop("/MCDU[0]/page", "DATA"); } if (getprop("/MCDU[0]/page") == "INITA") { - setprop("/MCDU[0]/page", "INITB"); + if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") != 3) { + setprop("/MCDU[0]/page", "INITB"); + } } else if (getprop("/MCDU[0]/page") == "INITB") { setprop("/MCDU[0]/page", "INITA"); } diff --git a/Nasal/MCDU2/MCDU.nas b/Nasal/MCDU2/MCDU.nas index 5bb9b5e7..cd7cfa1a 100644 --- a/Nasal/MCDU2/MCDU.nas +++ b/Nasal/MCDU2/MCDU.nas @@ -333,7 +333,9 @@ var arrowbutton = func(btn) { setprop("/MCDU[1]/page", "DATA"); } if (getprop("/MCDU[1]/page") == "INITA") { - setprop("/MCDU[1]/page", "INITB"); + if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") != 3) { + setprop("/MCDU[1]/page", "INITB"); + } } else if (getprop("/MCDU[1]/page") == "INITB") { setprop("/MCDU[1]/page", "INITA"); } diff --git a/revision.txt b/revision.txt index 0161ef45..235c4368 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -3052 \ No newline at end of file +3053 \ No newline at end of file