diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas index 331298f7..731ac13e 100644 --- a/AircraftConfig/acconfig.nas +++ b/AircraftConfig/acconfig.nas @@ -497,7 +497,7 @@ var taxi_b = func { if (pts.Instrumentation.Altimeter.std.getBoolValue()) { libraries.toggleSTD(); } - setprop("/instrumentation/altimeter[0]/setting-inhg", getprop("/environment/pressure-sea-level-inhg")); + setprop("/instrumentation/altimeter[0]/setting-inhg", getprop("/environment/metar[0]/pressure-inhg") or 29.92); settimer(taxi_c, 2); } var taxi_c = func { diff --git a/Nasal/MCDU/FUELPRED.nas b/Nasal/MCDU/FUELPRED.nas index 5bceb179..544339da 100644 --- a/Nasal/MCDU/FUELPRED.nas +++ b/Nasal/MCDU/FUELPRED.nas @@ -219,9 +219,9 @@ var fuelPredInput = func(key, i) { } 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")); + mcdu_message(i, "USING COST INDEX N", getprop("/FMGC/internal/last-cost-index") or 0); setprop("/FMGC/internal/cost-index-set", 1); - setprop("/FMGC/internal/cost-index", getprop("/FMGC/internal/last-cost-index")); + setprop("/FMGC/internal/cost-index", getprop("/FMGC/internal/last-cost-index") or 0); } } } else if (key == "R4") { diff --git a/Nasal/MCDU/INITB.nas b/Nasal/MCDU/INITB.nas index 5e44e127..0a3231a8 100644 --- a/Nasal/MCDU/INITB.nas +++ b/Nasal/MCDU/INITB.nas @@ -151,11 +151,6 @@ var initInputB = 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) { @@ -237,6 +232,12 @@ var initInputB = 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") or 0); + setprop("/FMGC/internal/cost-index-set", 1); + setprop("/FMGC/internal/cost-index", getprop("/FMGC/internal/last-cost-index") or 0); + } } } else if (key == "R2" and !getprop("/FMGC/internal/fuel-calculating")) { if (scratchpad == "CLR") { diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index 777f63ea..f4741be6 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -59,7 +59,6 @@ var MCDU_reset = func(i) { setprop("/FMGC/internal/alt-set", 0); setprop("/FMGC/internal/cost-index", "0"); setprop("/FMGC/internal/cost-index-set", 0); - setprop("/FMGC/internal/last-cost-index", 0); setprop("/FMGC/internal/cruise-ft", 10000); setprop("/FMGC/internal/cruise-fl", 100); setprop("/FMGC/internal/cruise-lvl-set", 0);