diff --git a/Nasal/FMGC/flightplan.nas b/Nasal/FMGC/flightplan.nas index 5e515566..a3909c1b 100644 --- a/Nasal/FMGC/flightplan.nas +++ b/Nasal/FMGC/flightplan.nas @@ -368,8 +368,8 @@ var flightPlanController = { # use createWP here as createWPFrom doesn't accept waypoints # createWPFrom worked before... but be sure! - me.flightplans[plan].insertWP(createWP(waypointGhost, waypointGhost.wp_name), 2); - fmgc.windController.insertWind(plan, 2, 0, waypointGhost.wp_name); + me.flightplans[plan].insertWP(createWP(waypointGhost, waypointGhost.id), 2); + fmgc.windController.insertWind(plan, 2, 0, waypointGhost.id); me.addDiscontinuity(3, plan); } else { # we want to delete the intermediate waypoints up to but not including the waypoint. Leave index 0, we delete it later. diff --git a/Nasal/FMGC/mcdu-messages.nas b/Nasal/FMGC/mcdu-messages.nas index 4b1a247f..b66c25a3 100644 --- a/Nasal/FMGC/mcdu-messages.nas +++ b/Nasal/FMGC/mcdu-messages.nas @@ -170,7 +170,7 @@ var MessageController = { 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("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([ TypeIIMessage.new("LAT DISCONT AHEAD", "amb", 0),TypeIIMessage.new("MORE DRAG"),TypeIIMessage.new("RWY/LS MISMATCH", "amb", 0),TypeIIMessage.new("STEP DELETED"), diff --git a/Nasal/MCDU/DIRTO.nas b/Nasal/MCDU/DIRTO.nas index d557490b..a440bb20 100644 --- a/Nasal/MCDU/DIRTO.nas +++ b/Nasal/MCDU/DIRTO.nas @@ -254,6 +254,7 @@ var dirTo = { dirToFlag = 0; fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0); me.L1 = [" [ ]", " WAYPOINT", "blu"]; + me.fontMatrix = [[1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0]]; me.R1 = ["---- --- ", "UTC DIST ", "wht"]; } else { mcdu_message(me.computer, "NOT ALLOWED"); @@ -264,6 +265,7 @@ var dirTo = { dirToFlag = 0; fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1); me.L1 = [" [ ]", " WAYPOINT", "blu"]; + me.fontMatrix = [[1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0]]; me.R1 = ["---- --- ", "UTC DIST ", "wht"]; setprop("MCDU[" ~ me.computer ~ "]/page", "F-PLNA"); # todo - remember horizontal srcoll of f-plna? } else { diff --git a/Nasal/MCDU/FUELPRED.nas b/Nasal/MCDU/FUELPRED.nas index 9dbb490b..5bceb179 100644 --- a/Nasal/MCDU/FUELPRED.nas +++ b/Nasal/MCDU/FUELPRED.nas @@ -148,11 +148,6 @@ var fuelPredInput = func(key, i) { if (scratchpad == "CLR") { mcdu_message(i, "NOT ALLOWED"); } 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_max = 134.5; #61,000 kg, make based on performance if (size(scratchpad) == 0) { @@ -222,6 +217,12 @@ var fuelPredInput = func(key, i) { } else { 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") { if (scratchpad == "CLR") { diff --git a/Nasal/MCDU/RADNAV.nas b/Nasal/MCDU/RADNAV.nas index 03af4246..4e73a397 100644 --- a/Nasal/MCDU/RADNAV.nas +++ b/Nasal/MCDU/RADNAV.nas @@ -68,7 +68,7 @@ var radnavInput = func(key, i) { setprop("/FMGC/internal/ils1freq-set", 1); 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"))) { - genericMessage(i, "RWY/LS MISMATCH", "amb"); + mcdu_message(i, "RWY/LS MISMATCH"); } } else { mcdu_message(i, "NOT ALLOWED");