Skip to content

Commit

Permalink
Merge branch 'master' into add-slashed-zero-mfd
Browse files Browse the repository at this point in the history
  • Loading branch information
bulenteroglu committed Jan 7, 2025
2 parents 0d2d592 + d3db4cf commit b50b3b8
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 14 deletions.
5 changes: 1 addition & 4 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
1. [A380X/MFD] MFD/SURV: Fixed TCAS not switching status when using DEFAULT SETTINGS button - @flogross89 (floridude)
1. [A380X/FUEL] Recalibrated inital fuel settings - @sschiphorst (Yahtzee94)
1. [A380X/ENG] Another adjustment to taxi thrust - @donstim (donbikes)
1. [A380X/ANIM] Animation of flaps now from FPPU position. Interim fix for spoiler low end animation - @Crocket63 (crocket)
1. [A380X/ENGINES] Another adjustment to taxi thrust - @donstim (donbikes)
1. [A380/ANIM] Animation of flaps now from FPPU position. Interim fix for spoiler low end animation - @Crocket63 (crocket)
1. [A380X/ENG] Improve oil pressure lookup table - @tracernz (Mike)
1. [A380X/FADEC] Add N1 fan protection measures (METOTS, KOZ) - @flogross89 (floridude)
Expand Down Expand Up @@ -104,8 +102,6 @@
1. [A380X/EFIS] Illuminate ND range and mode selectors during light test - @BravoMike99 (bruno_pt99)
1. [A380/PFD] Add DISCONNECT AP FOR LDG FMA message - @BravoMike99 (bruno_pt99)
1. [A380X/ENG] Adjust climb thrust to be more accurate - @BlueberryKing (BlueberryKing)
1. [A380X/ANIM] Animation of flaps now from FPPU position. Interim fix for spoiler low end animation - @Crocket63 (crocket)
1. [A380X/ENGINES] Adjust climb thrust to be more accurate - @BlueberryKing (BlueberryKing)
1. [A380X/EWD] Show THR limit in EWD instead of N1 - @flogross89 (floridude)
1. [A380X/FLIGHT MODEL] Fix pitchup and unrecoverable stall - - @donstim (donbikes#4084)
1. [ATC/TCAS] Fixed TCAS failure on baro corrected altitude going invalid - @tracernz (Mike)
Expand All @@ -116,6 +112,7 @@
1. [A380X/PFD] Fix font colours on metric altitude display - @MrJigs7 (MrJigs.)
1. [A380X/MFD] Fixed the altitude prediction not rounding to the nearest 10 on the FPLN page - @bulenteroglu (senolitam)
1. [A380X/MFD] Update font for MFD F-PLN page to use slashed zero font - @bulenteroglu (senolitam)
1. [A380X/ND] Remove leading zeros from terrain elevation display - @BravoMike99 (bruno_pt99)

## 0.12.0

Expand Down
9 changes: 7 additions & 2 deletions fbw-a32nx/src/systems/instruments/src/ND/instrument.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
InstrumentBackplane,
Subject,
} from '@microsoft/msfs-sdk';
import { a320EfisRangeSettings, ArincEventBus, EfisSide } from '@flybywiresim/fbw-sdk';
import { a320EfisRangeSettings, a320TerrainThresholdPadValue, ArincEventBus, EfisSide } from '@flybywiresim/fbw-sdk';
import { NDComponent } from '@flybywiresim/navigation-display';

import { NDSimvarPublisher, NDSimvars } from './NDSimvarPublisher';
Expand Down Expand Up @@ -141,7 +141,12 @@ class NDInstrument implements FsInstrument {
failed={this.displayFailed}
normDmc={getDisplayIndex()}
>
<NDComponent bus={this.bus} side={this.efisSide} rangeValues={a320EfisRangeSettings} />
<NDComponent
bus={this.bus}
side={this.efisSide}
rangeValues={a320EfisRangeSettings}
terrainThresholdPaddingText={a320TerrainThresholdPadValue}
/>
</DisplayUnit>,
document.getElementById('ND_CONTENT'),
);
Expand Down
8 changes: 7 additions & 1 deletion fbw-a380x/src/systems/instruments/src/ND/instrument.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
import {
A380EfisNdRangeValue,
a380EfisRangeSettings,
a380TerrainThresholdPadValue,
ArincEventBus,
BtvSimvarPublisher,
EfisNdMode,
Expand Down Expand Up @@ -280,7 +281,12 @@ class NDInstrument implements FsInstrument {
/>
</div>
</div>
<NDComponent bus={this.bus} side={this.efisSide} rangeValues={a380EfisRangeSettings} />
<NDComponent
bus={this.bus}
side={this.efisSide}
rangeValues={a380EfisRangeSettings}
terrainThresholdPaddingText={a380TerrainThresholdPadValue}
/>
<ContextMenu
ref={this.contextMenuRef}
opened={this.contextMenuOpened}
Expand Down
4 changes: 3 additions & 1 deletion fbw-common/src/systems/instruments/src/ND/ND.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export interface NDProps<T extends number> {
side: EfisSide;

rangeValues: T[];

terrainThresholdPaddingText: string;
}

export class NDComponent<T extends number> extends DisplayComponent<NDProps<T>> {
Expand Down Expand Up @@ -463,7 +465,7 @@ export class NDComponent<T extends number> extends DisplayComponent<NDProps<T>>
MODE CHANGE
</Flag>

<TerrainMapThresholds bus={this.props.bus} />
<TerrainMapThresholds bus={this.props.bus} paddingText={this.props.terrainThresholdPaddingText} />

<RadioNavInfo bus={this.props.bus} index={1} mode={this.currentPageMode} />
<RadioNavInfo bus={this.props.bus} index={2} mode={this.currentPageMode} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { GenericTawsEvents, TerrainLevelMode } from './types/GenericTawsEvents';

export interface TerrainMapThresholdsProps {
bus: EventBus;
paddingText: string;
}

export class TerrainMapThresholds extends DisplayComponent<TerrainMapThresholdsProps> {
Expand All @@ -24,13 +25,14 @@ export class TerrainMapThresholds extends DisplayComponent<TerrainMapThresholdsP
);

private readonly upperBorder = this.maxElevationSub.map((elevation) => {
let roundedElevation: string;
if (elevation !== 0) {
return Math.round(elevation / 100 + 0.5)
.toString()
.padStart(3, '0');
roundedElevation = Math.round(elevation / 100 + 0.5).toString();
} else {
roundedElevation = '0';
}

return '000';
return roundedElevation.padStart(3, this.props.paddingText);
});

private readonly upperBorderColor = this.maxElevationModeSub.map((mode) => {
Expand All @@ -45,10 +47,10 @@ export class TerrainMapThresholds extends DisplayComponent<TerrainMapThresholdsP
});

private readonly lowerBorder = this.minElevationSub.map((elevation) => {
if (elevation >= 0) {
if (elevation > 0) {
return Math.floor(elevation / 100)
.toString()
.padStart(3, '0');
.padStart(3, this.props.paddingText);
}

return '';
Expand Down
4 changes: 4 additions & 0 deletions fbw-common/src/systems/instruments/src/NavigationDisplay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export const a320EfisOansRangeSettings: A320EfisOansNdRangeValue[] = [-1, 10, 20

export const a380EfisRangeSettings: A380EfisNdRangeValue[] = [-1, 10, 20, 40, 80, 160, 320, 640];

export const a320TerrainThresholdPadValue = '0';

export const a380TerrainThresholdPadValue = '\\xa0';

export enum EfisNdMode {
ROSE_ILS,
ROSE_VOR,
Expand Down

0 comments on commit b50b3b8

Please sign in to comment.