diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas index a2d3b9b8..91e75dcc 100644 --- a/AircraftConfig/acconfig.nas +++ b/AircraftConfig/acconfig.nas @@ -327,6 +327,7 @@ var beforestart = func { setprop("/controls/flight/elevator-trim", 0); libraries.systemsInit(); libraries.variousReset(); + setprop("/controls/oxygen/crewOxyPB", 1); failResetOld(); # Now the Startup! @@ -422,6 +423,7 @@ var taxi = func { setprop("/controls/flight/elevator-trim", 0); libraries.systemsInit(); libraries.variousReset(); + setprop("/controls/oxygen/crewOxyPB", 1); failResetOld(); # Now the Startup! diff --git a/Nasal/MCDU/INITA.nas b/Nasal/MCDU/INITA.nas index 859508da..741aa009 100644 --- a/Nasal/MCDU/INITA.nas +++ b/Nasal/MCDU/INITA.nas @@ -138,10 +138,10 @@ var initInputA = func(key, i) { } else if (find("/", scratchpad) != -1) { var crztemp = split("/", scratchpad); if (find("FL", crztemp[0]) != -1) { - var crz = int(substr(crztemp[0], 2)); + var crz = substr(crztemp[0], 2); var crzs = size(substr(crztemp[0], 2)); } else { - var crz = int(crztemp[0]); + var crz = crztemp[0]; var crzs = size(crztemp[0]); } var temp = int(crztemp[1]); @@ -160,17 +160,17 @@ var initInputA = func(key, i) { } else { mcdu_message(i, "NOT ALLOWED"); } - } else if (crzs >= 1 and crzs <= 3 and crz != nil and temps >= 1 and temps <= 3 and temp != nil) { + } else if (find(".", crz) == -1 and crzs >= 1 and crzs <= 3 and crz != nil and temps >= 1 and temps <= 3 and temp != nil) { if (crz > 0 and crz <= 390 and temp >= -99 and temp <= 99) { - fmgc.FMGCInternal.crzFt = crz * 100; - fmgc.FMGCInternal.crzFl = crz; + fmgc.FMGCInternal.crzFt = int(crz) * 100; + fmgc.FMGCInternal.crzFl = int(crz); fmgc.altvert(); fmgc.updateRouteManagerAlt(); fmgc.FMGCInternal.crzSet = 1; updateCrzLvlCallback(); fmgc.FMGCInternal.crzTemp = temp; fmgc.FMGCInternal.crzTempSet = 1; - fmgc.FMGCInternal.crzProg = crz; + fmgc.FMGCInternal.crzProg = int(crz); if (fmgc.FMGCInternal.blockConfirmed) { fmgc.FMGCInternal.fuelCalculating = 0; fmgc.fuelCalculating.setValue(0); @@ -186,21 +186,21 @@ var initInputA = func(key, i) { } } else { if (find("FL", scratchpad) != -1) { - var crz = int(substr(scratchpad, 2)); + var crz = substr(scratchpad, 2); var crzs = size(substr(scratchpad, 2)); } else { - var crz = int(scratchpad); + var crz = scratchpad; var crzs = size(scratchpad); } - if (crzs >= 1 and crzs <= 3 and crz != nil) { + if (find(".", crz) == -1 and crzs >= 1 and crzs <= 3 and crz != nil) { if (crz > 0 and crz <= 390) { - fmgc.FMGCInternal.crzFt = crz * 100; - fmgc.FMGCInternal.crzFl = crz; + fmgc.FMGCInternal.crzFt = int(crz) * 100; + fmgc.FMGCInternal.crzFl = int(crz); fmgc.altvert(); fmgc.updateRouteManagerAlt(); fmgc.FMGCInternal.crzSet = 1; updateCrzLvlCallback(); - fmgc.FMGCInternal.crzProg = crz; + fmgc.FMGCInternal.crzProg = int(crz); if (fmgc.FMGCInternal.blockConfirmed) { fmgc.FMGCInternal.fuelCalculating = 0; fmgc.fuelCalculating.setValue(0);