Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export abstract class FMCMainDisplay implements FmsDataInterface, FmsDisplayInte
/** Declaration of every variable used (NOT initialization) */
private maxCruiseFL = 410;
private recMaxCruiseFL = 415;
public paxNbr: number | undefined;
public coRoute = { routeNumber: undefined, routes: undefined };
public perfTOTemp = NaN;
private _routeFinalFuelWeight = 0;
Expand Down Expand Up @@ -714,7 +715,7 @@ export abstract class FMCMainDisplay implements FmsDataInterface, FmsDisplayInte

this.efisSymbolsLeft?.update();
this.efisSymbolsRight.update();

this.arincBusOutputs.forEach((word) => word.writeToSimVarIfDirty());
}

Expand Down Expand Up @@ -2119,6 +2120,24 @@ export abstract class FMCMainDisplay implements FmsDataInterface, FmsDisplayInte
return false;
}

public tryUpdatePaxNbr(paxNbr: string): boolean {
const value = parseInt(paxNbr);
if (isFinite(value)) {
if (value >= 0) {
if (value < 1000) {
this.paxNbr = value;
this.updateManagedSpeeds();
return true;
} else {
this.setScratchpadMessage(NXSystemMessages.entryOutOfRange);
return false;
}
}
}
this.setScratchpadMessage(NXSystemMessages.notAllowed);
return false;
}

public tryUpdateCostIndex(costIndex: string): boolean {
const value = parseInt(costIndex);
if (isFinite(value)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ interface LegacyFmsPageFmsInterface extends FmsDataInterface, FmsDisplayInterfac
getDestinationTransitionLevel(): number | undefined;
getNavModeSpeedConstraint(): number;
trySetPreSelectedClimbSpeed(s: string): boolean;
tryUpdatePaxNbr(paxNbr: string): boolean;
tryUpdateCostIndex(costIndex: string): boolean;
trySetPerfClbPredToAltitude(value: string): boolean;
trySetPreSelectedCruiseSpeed(s: string): boolean;
Expand Down Expand Up @@ -250,6 +251,8 @@ interface LegacyFmsPageFmsInterface extends FmsDataInterface, FmsDisplayInterfac
simbrief: any;
isCostIndexSet: boolean;
costIndex: number | undefined;
isPaxNbrSet: boolean;
paxNbr: number | undefined;
cruiseLevel: number | undefined;
cruiseTemperature?: number;
tempCurve: any; // we don't have the MSFS SDK typings for these curves
Expand Down
Loading