diff --git a/src/ui/cockpitBriefing.js b/src/ui/cockpitBriefing.js index b701ddab0..40f442256 100644 --- a/src/ui/cockpitBriefing.js +++ b/src/ui/cockpitBriefing.js @@ -85,11 +85,11 @@ export function relocalizeBrief() { Object.assign(this.brief, cycleWords(this.briefAutoRotateEnabled)); this.showBriefPage(this.briefPageIndex); if (this.regionalBrief) - this.renderRegionalBrief(this.regionalBrief, this.lastAircraftInfo); + this.renderRegionalBrief(this.regionalBrief, this.lastSubjectInfo); else if (this.brief.news.state) this.renderRegionalBriefStatus( this.brief.news.state, - this.lastAircraftInfo, + this.lastSubjectInfo, ); } diff --git a/src/ui/cockpitController.js b/src/ui/cockpitController.js index 1fd4b7733..011e32ebc 100644 --- a/src/ui/cockpitController.js +++ b/src/ui/cockpitController.js @@ -217,7 +217,8 @@ export class CockpitViewController { this.contextView = createContextState(); this.brief = createBriefState(); this.briefTimer = null; - this.lastAircraftInfo = null; + // The last aircraft or vessel the HUD drew. + this.lastSubjectInfo = null; this.regionalBrief = null; this.regionalBriefAnchor = null; this.regionalBriefFetchedAt = 0; @@ -399,8 +400,8 @@ export class CockpitViewController { /** Step the bridge radar to its next range and redraw it at once. */ cycleRadarRange() { this.radarRangeNm = nextRadarRange(this.radarRangeNm); - if (this.active && this.subjectKind === 'vessel' && this.lastAircraftInfo) - this.updateRadar(this.lastAircraftInfo); + if (this.active && this.subjectKind === 'vessel' && this.lastSubjectInfo) + this.updateRadar(this.lastSubjectInfo); } presentLook() { return presentLook.call(this); @@ -555,10 +556,10 @@ export class CockpitViewController { this.relocalizeBrief(); this.publishVision(createVisionState(this.visionMode)); this.routeSignature = null; - if (this.active && this.lastAircraftInfo) { + if (this.active && this.lastSubjectInfo) { this.rewordingSignals = true; try { - this.updateHud(this.lastAircraftInfo, performance.now(), true); + this.updateHud(this.lastSubjectInfo, performance.now(), true); } finally { this.rewordingSignals = false; } diff --git a/src/ui/cockpitInstruments.js b/src/ui/cockpitInstruments.js index 9e6109811..413727f3b 100644 --- a/src/ui/cockpitInstruments.js +++ b/src/ui/cockpitInstruments.js @@ -142,7 +142,7 @@ export function updateHud( updateVesselHud.call(this, info, nowMs, forceContext); return; } - this.lastAircraftInfo = info; + this.lastSubjectInfo = info; const view = this.instruments; view.kind = 'aircraft'; view.trackSource = null; @@ -247,7 +247,7 @@ export function updateHud( * Signals stay aircraft-only, so the Contact card is withdrawn. */ function updateVesselHud(info, nowMs, forceContext) { - this.lastAircraftInfo = info; + this.lastSubjectInfo = info; const view = this.instruments; view.kind = 'vessel'; view.trackSource = info.trackSource ?? null;