Skip to content

Commit

Permalink
fix(mfd): update no fuel fields to 3 dashes when no data
Browse files Browse the repository at this point in the history
  • Loading branch information
BravoMike99 committed Nov 2, 2024
1 parent 05e761c commit 37cd79a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ export class MfdFmsFpln extends FmsPage<MfdFmsFplnProps> {

private destTimeLabel = Subject.create<string>('--:--');

private destEfob = Subject.create<string>('--.-');
private destEfob = Subject.create<string>('---.-');

private destDistanceLabel = Subject.create<string>('---');
private destDistanceLabel = Subject.create<string>('----');

private displayFplnFromLineIndex = Subject.create<number>(0);

Expand Down Expand Up @@ -167,11 +167,11 @@ export class MfdFmsFpln extends FmsPage<MfdFmsFplnProps> {
if (destEfob) {
this.destEfob.set(Math.max(0, Units.poundToKilogram(destEfob) / 1_000).toFixed(1));
} else {
this.destEfob.set('--.-');
this.destEfob.set('---.-');
}

this.destDistanceLabel.set(
Number.isFinite(destPred.distanceFromAircraft) ? destPred.distanceFromAircraft.toFixed(0) : '---',
Number.isFinite(destPred.distanceFromAircraft) ? destPred.distanceFromAircraft.toFixed(0) : '----',
);
}
this.checkScrollButtons();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ export class MfdFmsFuelLoad extends FmsPage<MfdFmsFuelLoadProps> {

private destEta = Subject.create<string>('--:--');

private destEfob = Subject.create<string>('--.-');
private destEfob = Subject.create<string>('---.-');

private destEfobBelowMin = Subject.create(false);

private altnIcao = Subject.create<string>('----');

private altnEta = Subject.create<string>('--:--');

private altnEfob = Subject.create<string>('--.-');
private altnEfob = Subject.create<string>('---.-');

private altnEfobBelowMin = Subject.create(false);

Expand Down Expand Up @@ -111,7 +111,7 @@ export class MfdFmsFuelLoad extends FmsPage<MfdFmsFuelLoadProps> {
);
}
const destEfob = this.props.fmcService.master.fmgc.getDestEFOB(true);
this.destEfob.set(destEfob !== null ? destEfob.toFixed(1) : '--.-');
this.destEfob.set(destEfob !== null ? destEfob.toFixed(1) : '---.-');
this.destEfobBelowMin.set(
destEfob * 1_000 < (this.props.fmcService.master.fmgc.data.minimumFuelAtDestination.get() ?? 0),
);
Expand All @@ -120,12 +120,12 @@ export class MfdFmsFuelLoad extends FmsPage<MfdFmsFuelLoadProps> {
if (this.loadedFlightPlan.alternateDestinationAirport) {
this.altnIcao.set(this.loadedFlightPlan.alternateDestinationAirport.ident);
this.altnEta.set('--:--');
this.altnEfob.set('--.-');
this.altnEfob.set('---.-');
this.altnEfobBelowMin.set(false);
} else {
this.altnIcao.set('NONE');
this.altnEta.set('--:--');
this.altnEfob.set('--.-');
this.altnEfob.set('---.-');
this.altnEfobBelowMin.set(false);
}
}
Expand Down Expand Up @@ -525,7 +525,7 @@ export class MfdFmsFuelLoad extends FmsPage<MfdFmsFuelLoadProps> {
<div style="display: flex; flex-direction: row; justify-content: center; align-items: center;">
<div class="mfd-label-value-container" style="margin-right: 20px;">
<span class="mfd-value">
{this.extraFuelWeight.map((it) => (it ? (it / 1000).toFixed(1) : '--.-'))}
{this.extraFuelWeight.map((it) => (it ? (it / 1000).toFixed(1) : '---.-'))}
</span>
<span class="mfd-label-unit mfd-unit-trailing">T</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ export class MfdFmsPerf extends FmsPage<MfdFmsPerfProps> {
);
}
this.destEta.set(destEta);
this.destEfob.set(this.props.fmcService.master?.fmgc.getDestEFOB(true).toFixed(1) ?? '--.-');
this.destEfob.set(this.props.fmcService.master?.fmgc.getDestEFOB(true).toFixed(1) ?? '---.-');

// Update DES speed table
if (this.activeFlightPhase.get() < FmgcFlightPhase.Descent) {
Expand Down

0 comments on commit 37cd79a

Please sign in to comment.