1
0
Fork 0

Fix potential bug in QRH, fix bug in simbrief parser

This commit is contained in:
legoboyvdlp R 2020-10-31 21:47:46 +00:00
parent ef3bc019ae
commit 5adce22c68
3 changed files with 9 additions and 5 deletions

View file

@ -80,8 +80,11 @@ var SimbriefParser = {
if (departures != nil and size(departures) != 0 and destinations != nil and size(destinations) != 0) {
fmgc.flightPlanController.flightplans[3].departure = departures[0];
fmgc.flightPlanController.flightplans[3].destination = destinations[0];
fmgc.FMGCInternal.arrApt = destinationID;
fmgc.FMGCInternal.depApt = departureID;
fmgc.FMGCInternal.arrApt = destinationID;
atsu.ATISInstances[0].newStation(departureID);
atsu.ATISInstances[1].newStation(destinationID);
fmgc.FMGCInternal.toFromSet = 1;
fmgc.FMGCNodes.toFromSet.setValue(1);
@ -107,6 +110,7 @@ var SimbriefParser = {
var alternates = findAirportsByICAO(alternateID);
if (alternates != nil and size(alternates) != 0) {
fmgc.FMGCInternal.altAirport = alternateID;
atsu.ATISInstances[2].newStation(alternateID);
fmgc.FMGCInternal.altAirportSet = 1;
}

View file

@ -37,7 +37,7 @@ var createCanvasQRH = func() {
qrhCanvas.setLayout(myHBox);
QRH = canvas.gui.widgets.Label.new(root, canvas.style, {} )
.setImage("Aircraft/A320-family/Models/FlightDeck/QRH/" ~ QRHpageNo.getValue() ~ ".jpeg")
.setImage(resolvepath("Aircraft/A320-family/Models/FlightDeck/QRH/" ~ QRHpageNo.getValue() ~ ".jpeg"))
.move(0,-25)
.setSize(400,625);
myHBox.addItem(QRH);
@ -78,11 +78,11 @@ var createCanvasQRH = func() {
});
buttonPrev.listen("clicked", func {
prevPage();
QRH.setImage("Aircraft/A320-family/Models/FlightDeck/QRH/" ~ QRHpageNo.getValue() ~ ".jpeg");
QRH.setImage(resolvepath("Aircraft/A320-family/Models/FlightDeck/QRH/" ~ QRHpageNo.getValue() ~ ".jpeg"));
});
buttonNext.listen("clicked", func {
nextPage();
QRH.setImage("Aircraft/A320-family/Models/FlightDeck/QRH/" ~ QRHpageNo.getValue() ~ ".jpeg");
QRH.setImage(resolvepath("Aircraft/A320-family/Models/FlightDeck/QRH/" ~ QRHpageNo.getValue() ~ ".jpeg"));
});

View file

@ -330,7 +330,7 @@ var ATIS = {
},
processATIS: func(r, i) {
var raw = r.response;
if (r.response == "FBW_ERROR: D-ATIS not available at this airport") {
if (r.response == "FBW_ERROR: D-ATIS not available at this airport" or find("atis not avail",r.response) != -1) {
me.received = 0;
me.sent = 0;
mcdu.mcdu_message(i,"NO D-ATIS AVAILABLE");