Skip to content

Commit

Permalink
port getOrSelectNavaidsByIdent
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjozork committed Mar 26, 2023
1 parent 9c462b3 commit 5c980df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2506,7 +2506,7 @@ class FMCMainDisplay extends BaseAirliners {
this._getOrSelectWaypoints(this.navigationDatabase.searchNdb.bind(this.navigationDatabase), ident, callback);
}
getOrSelectNavaidsByIdent(ident, callback) {
this._getOrSelectWaypoints(this.dataManager.GetNavaidsByIdent.bind(this.dataManager), ident, callback);
this._getOrSelectWaypoints(this.navigationDatabase.searchAllNavaid.bind(this.navigationDatabase), ident, callback);
}

getOrSelectWaypointByIdent(ident, callback) {
Expand Down
7 changes: 7 additions & 0 deletions fbw-a32nx/src/systems/fmgc/src/NavigationDatabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ export class NavigationDatabase {
return this.backendDatabase.getNDBs([ident]);
}

async searchAllNavaid(ident: string): Promise<(VhfNavaid | NdbNavaid)[]> {
return [
...(await this.backendDatabase.getNavaids([ident])),
...(await this.backendDatabase.getNDBs([ident])),
];
}

async searchAirway(ident: string, fromFix: Fix): Promise<Airway[]> {
if (fromFix) {
const airways = await this.backendDatabase.getAirwaysByFix(fromFix);
Expand Down

0 comments on commit 5c980df

Please sign in to comment.