From d91b465b749a0634c00de5c59c48c2269963c416 Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Thu, 18 May 2017 14:52:02 -0400 Subject: [PATCH] fix error in INITB, make INITB accessable with --> key --- Models/Instruments/MCDU1/INITB/INITB.xml | 2 +- Models/Instruments/MCDU1/MCDU1.xml | 22 ++++++++++++++++++++++ Models/Instruments/MCDU2/INITB/INITB.xml | 2 +- Models/Instruments/MCDU2/MCDU2.xml | 22 ++++++++++++++++++++++ Nasal/MCDU1.nas | 24 ++++++++++++++++++++++-- Nasal/MCDU2.nas | 22 ++++++++++++++++++++++ 6 files changed, 90 insertions(+), 4 deletions(-) diff --git a/Models/Instruments/MCDU1/INITB/INITB.xml b/Models/Instruments/MCDU1/INITB/INITB.xml index 134b5b25..2b184a33 100644 --- a/Models/Instruments/MCDU1/INITB/INITB.xml +++ b/Models/Instruments/MCDU1/INITB/INITB.xml @@ -76,7 +76,7 @@ -0.001 -0.042 - 0.0755 + 0.0715 left-center yz-plane diff --git a/Models/Instruments/MCDU1/MCDU1.xml b/Models/Instruments/MCDU1/MCDU1.xml index 5226861c..6bce3f67 100644 --- a/Models/Instruments/MCDU1/MCDU1.xml +++ b/Models/Instruments/MCDU1/MCDU1.xml @@ -70,6 +70,28 @@ + + INITB + INITB/INITB.xml + + 180 + 180 + 90 + + + + + /systems/electrical/bus/ac1 + 25 + + + /MCDU[0]/page + INITB + + + + + DATA DATA/DATA.xml diff --git a/Models/Instruments/MCDU2/INITB/INITB.xml b/Models/Instruments/MCDU2/INITB/INITB.xml index 134b5b25..2b184a33 100644 --- a/Models/Instruments/MCDU2/INITB/INITB.xml +++ b/Models/Instruments/MCDU2/INITB/INITB.xml @@ -76,7 +76,7 @@ -0.001 -0.042 - 0.0755 + 0.0715 left-center yz-plane diff --git a/Models/Instruments/MCDU2/MCDU2.xml b/Models/Instruments/MCDU2/MCDU2.xml index 8fe38a55..f9522985 100644 --- a/Models/Instruments/MCDU2/MCDU2.xml +++ b/Models/Instruments/MCDU2/MCDU2.xml @@ -70,6 +70,28 @@ + + INITB + INITB/INITB.xml + + 180 + 180 + 90 + + + + + /systems/electrical/bus/ac1 + 25 + + + /MCDU[1]/page + INITB + + + + + DATA DATA/DATA.xml diff --git a/Nasal/MCDU1.nas b/Nasal/MCDU1.nas index fc78608c..e25f80fc 100644 --- a/Nasal/MCDU1.nas +++ b/Nasal/MCDU1.nas @@ -42,8 +42,6 @@ var initInputA = func(key) { } else { var crz = int(scratchpad); var crzs = size(scratchpad); - print(crz); - print(crzs); if (crzs >= 1 and crzs <= 3) { screenFlash(0.2); setprop("/FMGC/internal/cruise-ft", crz * 100); @@ -75,6 +73,17 @@ var arrowbutton = func(btn) { setprop("/MCDU[0]/page", "DATA"); }, 0.2); } + if (getprop("/MCDU[0]/page") == "INITA") { + setprop("/MCDU[0]/page", "NONE"); + settimer(func { + setprop("/MCDU[0]/page", "INITB"); + }, 0.2); + } else if (getprop("/MCDU[0]/page") == "INITB") { + setprop("/MCDU[0]/page", "NONE"); + settimer(func { + setprop("/MCDU[0]/page", "INITA"); + }, 0.2); + } } else if (btn == "right") { if (getprop("/MCDU[0]/page") == "DATA") { setprop("/MCDU[0]/page", "NONE"); @@ -87,6 +96,17 @@ var arrowbutton = func(btn) { setprop("/MCDU[0]/page", "DATA"); }, 0.2); } + if (getprop("/MCDU[0]/page") == "INITA") { + setprop("/MCDU[0]/page", "NONE"); + settimer(func { + setprop("/MCDU[0]/page", "INITB"); + }, 0.2); + } else if (getprop("/MCDU[0]/page") == "INITB") { + setprop("/MCDU[0]/page", "NONE"); + settimer(func { + setprop("/MCDU[0]/page", "INITA"); + }, 0.2); + } } else if (btn == "up") { # Nothing for now } else if (btn == "down") { diff --git a/Nasal/MCDU2.nas b/Nasal/MCDU2.nas index 94f44f93..2e713856 100644 --- a/Nasal/MCDU2.nas +++ b/Nasal/MCDU2.nas @@ -73,6 +73,17 @@ var arrowbutton = func(btn) { setprop("/MCDU[1]/page", "DATA"); }, 0.2); } + if (getprop("/MCDU[1]/page") == "INITA") { + setprop("/MCDU[1]/page", "NONE"); + settimer(func { + setprop("/MCDU[1]/page", "INITB"); + }, 0.2); + } else if (getprop("/MCDU[1]/page") == "INITB") { + setprop("/MCDU[1]/page", "NONE"); + settimer(func { + setprop("/MCDU[1]/page", "INITA"); + }, 0.2); + } } else if (btn == "right") { if (getprop("/MCDU[1]/page") == "DATA") { setprop("/MCDU[1]/page", "NONE"); @@ -85,6 +96,17 @@ var arrowbutton = func(btn) { setprop("/MCDU[1]/page", "DATA"); }, 0.2); } + if (getprop("/MCDU[1]/page") == "INITA") { + setprop("/MCDU[1]/page", "NONE"); + settimer(func { + setprop("/MCDU[1]/page", "INITB"); + }, 0.2); + } else if (getprop("/MCDU[1]/page") == "INITB") { + setprop("/MCDU[1]/page", "NONE"); + settimer(func { + setprop("/MCDU[1]/page", "INITA"); + }, 0.2); + } } else if (btn == "up") { # Nothing for now } else if (btn == "down") {