1
0
Fork 0

Several major bugfixes reported by @julienlengele - many thanks!

This commit is contained in:
legoboyvdlp R 2020-06-27 23:26:36 +01:00
parent 499786bb6e
commit 6cd65e9ac0
5 changed files with 12 additions and 9 deletions

View file

@ -368,8 +368,8 @@ var flightPlanController = {
# use createWP here as createWPFrom doesn't accept waypoints # use createWP here as createWPFrom doesn't accept waypoints
# createWPFrom worked before... but be sure! # createWPFrom worked before... but be sure!
me.flightplans[plan].insertWP(createWP(waypointGhost, waypointGhost.wp_name), 2); me.flightplans[plan].insertWP(createWP(waypointGhost, waypointGhost.id), 2);
fmgc.windController.insertWind(plan, 2, 0, waypointGhost.wp_name); fmgc.windController.insertWind(plan, 2, 0, waypointGhost.id);
me.addDiscontinuity(3, plan); me.addDiscontinuity(3, plan);
} else { } else {
# we want to delete the intermediate waypoints up to but not including the waypoint. Leave index 0, we delete it later. # we want to delete the intermediate waypoints up to but not including the waypoint. Leave index 0, we delete it later.

View file

@ -170,7 +170,7 @@ var MessageController = {
TypeIMessage.new("LIST OF 20 IN USE"),TypeIMessage.new("PILOT ELEMENT RETAINED"),TypeIMessage.new("NOT ALLOWED"), TypeIMessage.new("LIST OF 20 IN USE"),TypeIMessage.new("PILOT ELEMENT RETAINED"),TypeIMessage.new("NOT ALLOWED"),
TypeIMessage.new("NOT IN DATA BASE"),TypeIMessage.new("ONLY SPD ENTRY ALLOWED"),TypeIMessage.new("REVISION IN PROGRESS"), TypeIMessage.new("NOT IN DATA BASE"),TypeIMessage.new("ONLY SPD ENTRY ALLOWED"),TypeIMessage.new("REVISION IN PROGRESS"),
TypeIMessage.new("TMPY F-PLN EXISTS", 1),TypeIMessage.new("SELECT DESIRED SYSTEM"),TypeIMessage.new("SELECT HDG/TRK FIRST"), TypeIMessage.new("TMPY F-PLN EXISTS", 1),TypeIMessage.new("SELECT DESIRED SYSTEM"),TypeIMessage.new("SELECT HDG/TRK FIRST"),
TypeIMessage.new("USING COST INDEX N", 1),TypeIMessage.new("WAIT FOR SYSTEM RESPONSE"), TypeIMessage.new("USING COST INDEX N", 1),TypeIMessage.new("WAIT FOR SYSTEM RESPONSE"),TypeIMessage.new("RWY/LS MISMATCH"),
]), ]),
typeIIMessages: std.Vector.new([ typeIIMessages: std.Vector.new([
TypeIIMessage.new("LAT DISCONT AHEAD", "amb", 0),TypeIIMessage.new("MORE DRAG"),TypeIIMessage.new("RWY/LS MISMATCH", "amb", 0),TypeIIMessage.new("STEP DELETED"), TypeIIMessage.new("LAT DISCONT AHEAD", "amb", 0),TypeIIMessage.new("MORE DRAG"),TypeIIMessage.new("RWY/LS MISMATCH", "amb", 0),TypeIIMessage.new("STEP DELETED"),

View file

@ -254,6 +254,7 @@ var dirTo = {
dirToFlag = 0; dirToFlag = 0;
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0); fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0);
me.L1 = [" [ ]", " WAYPOINT", "blu"]; me.L1 = [" [ ]", " WAYPOINT", "blu"];
me.fontMatrix = [[1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0]];
me.R1 = ["---- --- ", "UTC DIST ", "wht"]; me.R1 = ["---- --- ", "UTC DIST ", "wht"];
} else { } else {
mcdu_message(me.computer, "NOT ALLOWED"); mcdu_message(me.computer, "NOT ALLOWED");
@ -264,6 +265,7 @@ var dirTo = {
dirToFlag = 0; dirToFlag = 0;
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1); fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1);
me.L1 = [" [ ]", " WAYPOINT", "blu"]; me.L1 = [" [ ]", " WAYPOINT", "blu"];
me.fontMatrix = [[1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0]];
me.R1 = ["---- --- ", "UTC DIST ", "wht"]; me.R1 = ["---- --- ", "UTC DIST ", "wht"];
setprop("MCDU[" ~ me.computer ~ "]/page", "F-PLNA"); # todo - remember horizontal srcoll of f-plna? setprop("MCDU[" ~ me.computer ~ "]/page", "F-PLNA"); # todo - remember horizontal srcoll of f-plna?
} else { } else {

View file

@ -148,11 +148,6 @@ var fuelPredInput = func(key, i) {
if (scratchpad == "CLR") { if (scratchpad == "CLR") {
mcdu_message(i, "NOT ALLOWED"); mcdu_message(i, "NOT ALLOWED");
} else { } else {
if (!getprop("/FMGC/internal/cost-index-set") and getprop("/FMGC/internal/tofrom-set")) {
mcdu_message(i, "USING COST INDEX N", getprop("/FMGC/internal/last-cost-index"));
setprop("/FMGC/internal/cost-index-set", 1);
setprop("/FMGC/internal/cost-index", getprop("/FMGC/internal/last-cost-index"));
}
var zfw_min = 80.6; #make based on performance var zfw_min = 80.6; #make based on performance
var zfw_max = 134.5; #61,000 kg, make based on performance var zfw_max = 134.5; #61,000 kg, make based on performance
if (size(scratchpad) == 0) { if (size(scratchpad) == 0) {
@ -222,6 +217,12 @@ var fuelPredInput = func(key, i) {
} else { } else {
mcdu_message(i, "NOT ALLOWED"); mcdu_message(i, "NOT ALLOWED");
} }
if (!getprop("/FMGC/internal/cost-index-set") and getprop("/FMGC/internal/tofrom-set")) {
mcdu_message(i, "USING COST INDEX N", getprop("/FMGC/internal/last-cost-index"));
setprop("/FMGC/internal/cost-index-set", 1);
setprop("/FMGC/internal/cost-index", getprop("/FMGC/internal/last-cost-index"));
}
} }
} else if (key == "R4") { } else if (key == "R4") {
if (scratchpad == "CLR") { if (scratchpad == "CLR") {

View file

@ -68,7 +68,7 @@ var radnavInput = func(key, i) {
setprop("/FMGC/internal/ils1freq-set", 1); setprop("/FMGC/internal/ils1freq-set", 1);
mcdu_scratchpad.scratchpads[i].empty(); mcdu_scratchpad.scratchpads[i].empty();
if (num(getprop("/FMGC/internal/ils1freq-calculated")) != 0 and num(getprop("/FMGC/internal/ils1freq-calculated")) != num(getprop("instrumentation/nav[0]/frequencies/selected-mhz"))) { if (num(getprop("/FMGC/internal/ils1freq-calculated")) != 0 and num(getprop("/FMGC/internal/ils1freq-calculated")) != num(getprop("instrumentation/nav[0]/frequencies/selected-mhz"))) {
genericMessage(i, "RWY/LS MISMATCH", "amb"); mcdu_message(i, "RWY/LS MISMATCH");
} }
} else { } else {
mcdu_message(i, "NOT ALLOWED"); mcdu_message(i, "NOT ALLOWED");