Skip to content

Commit

Permalink
fix: telex reporting of origin/dest (#8703)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjozork committed Jun 26, 2024
1 parent 6474e6e commit 8bfdc51
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { FlightPlanIndex, FlightPlanManager } from '@fmgc/flightplanning/new/FlightPlanManager';
import { FpmConfig, FpmConfigs } from '@fmgc/flightplanning/new/FpmConfig';
import { FlightPlanLeg, FlightPlanLegFlags } from '@fmgc/flightplanning/new/legs/FlightPlanLeg';
import { Fix, Waypoint } from '@flybywiresim/fbw-sdk';
import { Fix, NXDataStore, Waypoint } from '@flybywiresim/fbw-sdk';
import { NavigationDatabase } from '@fmgc/NavigationDatabase';
import { Coordinates, Degrees } from 'msfs-geo';
import { EventBus } from '@microsoft/msfs-sdk';
Expand Down Expand Up @@ -197,9 +197,14 @@ export class FlightPlanService<P extends FlightPlanPerformanceData = FlightPlanP

await this.flightPlanManager.get(planIndex).setOriginAirport(fromIcao);
await this.flightPlanManager.get(planIndex).setDestinationAirport(toIcao);

if (altnIcao) {
await this.flightPlanManager.get(planIndex).setAlternateDestinationAirport(altnIcao);
}

// Support code for TELEX API, should move somewhere else
NXDataStore.set('PLAN_ORIGIN', fromIcao);
NXDataStore.set('PLAN_DESTINATION', toIcao);
}

async setAlternate(altnIcao: string, planIndex = FlightPlanIndex.Active) {
Expand Down

0 comments on commit 8bfdc51

Please sign in to comment.