Skip to content

Commit

Permalink
Merge branch 'master' into fix/decals-update
Browse files Browse the repository at this point in the history
  • Loading branch information
flogross89 authored Nov 22, 2024
2 parents f27c3c7 + 1cd2ca7 commit 196545f
Show file tree
Hide file tree
Showing 32 changed files with 431 additions and 362 deletions.
5 changes: 5 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
1. [A380X/WING_FLEX] Reduced stiffness of wings for more tip up bend - @Crocket63 (crocket)
1. [A380X/FWS] Add V1 callout - @flogross89 (floridude)
1. [FMS] Fix existing T-P moving when inserting temporary flight plan - @Benjozork (Benjamin Dupont)
1. [OANS] Display correct flags when IRS position is not available - @Nufflee (nufflee)
1. [FMS] Use station declination for PBX/PBD waypoints - @BlueberryKing (BlueberryKing)
1. [RA] Add direct coupling and interrupted antenna cable failures to RAs - @beheh (Benedict Etzel)
1. [A32NX/TELEX] Keep flight number set even if already taken - @BenJuan26 (BenJuan26)
Expand Down Expand Up @@ -70,6 +71,10 @@
1. [MISC] Replaced brake temperature simulation with physics based model of brakes - @Gurgel100 (Pascal)
1. [A32NX/MCDU] Suppress TMPY FPLN when no modifications made in airways page - @robertxing2004 (robeet)
1. [A380X/FMC] Fix reset of perf data on done phase or database swap - @tracernz (Mike)
1. [A32NX/ATC] Fixed ATC/TCAS power supply - @tracernz (Mike)
1. [A32NX] Fixed appearance of FCU decals on MSFS2024 - @tracernz (Mike)
1. [FMS] Fixed issue with airport loading timing out on MSFS2024 - @tracernz (Mike)
1. [A32NX] Fixed APU fire detection - @tracernz (Mike)

## 0.12.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3441,6 +3441,7 @@
<SEQ1_POWERED>(L:A32NX_ELEC_AC_ESS_SHED_BUS_IS_POWERED, Bool) (L:A32NX_ELEC_AC_STAT_INV_BUS_IS_POWERED, Bool) or (L:A32NX_ELEC_AC_1_BUS_IS_POWERED, Bool) and</SEQ1_POWERED>
<SEQ2_POWERED>(L:A32NX_ELEC_AC_ESS_SHED_BUS_IS_POWERED, Bool) (L:A32NX_ELEC_AC_STAT_INV_BUS_IS_POWERED, Bool) or (L:A32NX_ELEC_AC_1_BUS_IS_POWERED, Bool) ! and</SEQ2_POWERED>
<SEQ3_POWERED>(L:A32NX_ELEC_AC_ESS_SHED_BUS_IS_POWERED, Bool) (L:A32NX_ELEC_AC_STAT_INV_BUS_IS_POWERED, Bool) or ! (L:A32NX_ELEC_AC_1_BUS_IS_POWERED, Bool) and</SEQ3_POWERED>
<ON_FIRE>(A:APU ON FIRE DETECTED)</ON_FIRE>
</UseTemplate>
<UseTemplate Name="FBW_Airbus_FIRE_GUARD">
<NODE_ID>LOCK_OVHD_APU</NODE_ID>
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion fbw-a32nx/src/behavior/src/A32NX_Interior_ATC.xml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
<SWITCH_POSITION_VAR>A32NX_SWITCH_ATC_ALT</SWITCH_POSITION_VAR>
<CODE_POS_0>0 (&gt;L:A32NX_SWITCH_ATC_ALT, number) #UPDATE_TRANSPONDER_STATE#</CODE_POS_0>
<CODE_POS_1>1 (&gt;L:A32NX_SWITCH_ATC_ALT, number) #UPDATE_TRANSPONDER_STATE#</CODE_POS_1>
<STATE0_TEST>(L:A32NX_SWITCH_ATC_ALT)!</STATE0_TEST>
<STATE0_TEST>(L:A32NX_SWITCH_ATC_ALT) !</STATE0_TEST>
<STATE1_TEST>(L:A32NX_SWITCH_ATC_ALT)</STATE1_TEST>
<ANIM_NAME>#KNOB_XPNDR_ALT_RPTG_ANIM_NAME#</ANIM_NAME>
<ANIMTIP_0>TT:COCKPIT.TOOLTIPS.ATC_ALT_RPTG_TURN_OFF</ANIMTIP_0>
Expand Down
7 changes: 4 additions & 3 deletions fbw-a32nx/src/behavior/src/A32NX_Interior_Fire.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<SEQ1_POWERED>1</SEQ1_POWERED>
<SEQ2_POWERED>0</SEQ2_POWERED>
<SEQ3_POWERED>0</SEQ3_POWERED>
<ON_FIRE>(A:ENG ON FIRE:#ID#, Bool) 1 ==</ON_FIRE>
</DefaultTemplateParameters>
<Component ID="#NODE_ID#" Node="#NODE_ID#">

Expand All @@ -78,19 +79,19 @@

<UseTemplate Name="ASOBO_GT_Component_Emissive_Gauge">
<NODE_ID>#NODE_ID#_SEQ1</NODE_ID>
<EMISSIVE_CODE>(L:A32NX_FIRE_TEST_#TYPE##ID#, Bool) (A:ENG ON FIRE:#ID#, Bool) 1 == or (L:A32NX_OVHD_INTLT_ANN) 0 == (L:A32NX_ELEC_DC_2_BUS_IS_POWERED, Bool) and or #SEQ1_POWERED# and</EMISSIVE_CODE>
<EMISSIVE_CODE>(L:A32NX_FIRE_TEST_#TYPE##ID#, Bool) #ON_FIRE# or (L:A32NX_OVHD_INTLT_ANN) 0 == (L:A32NX_ELEC_DC_2_BUS_IS_POWERED, Bool) and or #SEQ1_POWERED# and</EMISSIVE_CODE>
<EMISSIVE_DRIVES_VISIBILITY>True</EMISSIVE_DRIVES_VISIBILITY>
</UseTemplate>

<UseTemplate Name="ASOBO_GT_Component_Emissive_Gauge">
<NODE_ID>#NODE_ID#_SEQ2</NODE_ID>
<EMISSIVE_CODE>(L:A32NX_FIRE_TEST_#TYPE##ID#, Bool) (A:ENG ON FIRE:#ID#, Bool) 1 == or (L:A32NX_OVHD_INTLT_ANN) 0 == (L:A32NX_ELEC_DC_2_BUS_IS_POWERED, Bool) and or #SEQ2_POWERED# and</EMISSIVE_CODE>
<EMISSIVE_CODE>(L:A32NX_FIRE_TEST_#TYPE##ID#, Bool) #ON_FIRE# or (L:A32NX_OVHD_INTLT_ANN) 0 == (L:A32NX_ELEC_DC_2_BUS_IS_POWERED, Bool) and or #SEQ2_POWERED# and</EMISSIVE_CODE>
<EMISSIVE_DRIVES_VISIBILITY>True</EMISSIVE_DRIVES_VISIBILITY>
</UseTemplate>

<UseTemplate Name="ASOBO_GT_Component_Emissive_Gauge">
<NODE_ID>#NODE_ID#_SEQ3</NODE_ID>
<EMISSIVE_CODE>(L:A32NX_FIRE_TEST_#TYPE##ID#, Bool) (A:ENG ON FIRE:#ID#, Bool) 1 == or (L:A32NX_OVHD_INTLT_ANN) 0 == (L:A32NX_ELEC_DC_2_BUS_IS_POWERED, Bool) and or #SEQ3_POWERED# and</EMISSIVE_CODE>
<EMISSIVE_CODE>(L:A32NX_FIRE_TEST_#TYPE##ID#, Bool) #ON_FIRE# or (L:A32NX_OVHD_INTLT_ANN) 0 == (L:A32NX_ELEC_DC_2_BUS_IS_POWERED, Bool) and or #SEQ3_POWERED# and</EMISSIVE_CODE>
<EMISSIVE_DRIVES_VISIBILITY>True</EMISSIVE_DRIVES_VISIBILITY>
</UseTemplate>

Expand Down
2 changes: 1 addition & 1 deletion fbw-a32nx/src/systems/fmgc/src/navigation/NavaidTuner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export class NavaidTuner {

private handleKeyEvent(key: string, value1?: number, value0?: number, value2?: number): void {
if (NavaidTuner.TUNING_EVENT_INTERCEPTS.includes(key)) {
if (this.rmpTuningActive) {
if (this.rmpTuningActive || !this.isInit) {
// pass the tuning event through to the sim
Coherent.call('TRIGGER_KEY_EVENT', key, true, value0 ?? 0, value1 ?? 0, value2 ?? 0);
} else if (!this.blockEventMessageShown) {
Expand Down
6 changes: 0 additions & 6 deletions fbw-a32nx/src/systems/instruments/src/OANC/instrument.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ class A32NX_OANC extends BaseInstrument {

private readonly controlPanelVisible = Subject.create(false);

private readonly oansMessageScreenRef = FSComponent.createRef<HTMLDivElement>();

constructor() {
super();
this.efisSide = getDisplayIndex() === 1 ? 'L' : 'R';
Expand Down Expand Up @@ -122,9 +120,6 @@ class A32NX_OANC extends BaseInstrument {
class="oanc-container"
style={`width: ${OANC_RENDER_WIDTH}px; height: ${OANC_RENDER_HEIGHT}px; overflow: hidden`}
>
<div ref={this.oansMessageScreenRef} class="oanc-message-screen">
PLEASE WAIT
</div>
<Oanc
bus={this.bus}
side={this.efisSide}
Expand All @@ -133,7 +128,6 @@ class A32NX_OANC extends BaseInstrument {
contextMenuItems={this.contextMenuItems}
contextMenuX={this.contextMenuX}
contextMenuY={this.contextMenuY}
messageScreenRef={this.oansMessageScreenRef}
zoomValues={a320EfisZoomRangeSettings}
/>
<ControlPanel
Expand Down
16 changes: 9 additions & 7 deletions fbw-a32nx/src/systems/instruments/src/OANC/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
.oanc-container {
width: 768px;
height: 768px;
overflow: hidden;

background-color: $display-background;

font-family: "Ecam", monospace !important;
}

.oanc-message-screen {
.oanc-flag-container {
position: absolute;

width: 768px;
Expand All @@ -30,15 +31,10 @@
justify-content: center;
align-items: center;

font-size: 24px;

background-color: $display-background;
color: $display-white;

z-index: 9999;
}

.oanc-message-screen.amber {
.oanc-flag-container.amber {
color: $display-amber;
}

Expand Down Expand Up @@ -131,6 +127,12 @@
font-size: 24px;
}

.oanc-bottom-flag {
padding: 1px;
padding-left: 2px;
color: $display-amber;
}

.oanc-speed-info {
position: absolute;
top: 0;
Expand Down
2 changes: 1 addition & 1 deletion fbw-a32nx/src/systems/tcas/src/components/TcasComputer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export class TcasComputer implements TcasComponent {
this.ppos.lat = SimVar.GetSimVarValue('PLANE LATITUDE', 'degree latitude');
this.ppos.long = SimVar.GetSimVarValue('PLANE LONGITUDE', 'degree longitude');

this.tcasPower = !!SimVar.GetSimVarValue('A32NX_ELEC_DC_1_BUS_IS_POWERED', 'boolean');
this.tcasPower = !!SimVar.GetSimVarValue('L:A32NX_ELEC_DC_1_BUS_IS_POWERED', 'boolean');
this.tcasSwitchPos = SimVar.GetSimVarValue('L:A32NX_SWITCH_TCAS_Position', 'number');
this.altRptgSwitchPos = SimVar.GetSimVarValue('L:A32NX_SWITCH_ATC_ALT', 'number');
this.tcasThreat = SimVar.GetSimVarValue('L:A32NX_SWITCH_TCAS_Traffic_Position', 'number');
Expand Down
45 changes: 19 additions & 26 deletions fbw-a380x/src/systems/instruments/src/ND/OansControlPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import {
import {
AmdbAirportSearchResult,
Arinc429LocalVarConsumerSubject,
Arinc429RegisterSubject,
BtvData,
EfisSide,
FeatureType,
Expand Down Expand Up @@ -123,16 +122,23 @@ export class OansControlPanel extends DisplayComponent<OansProps> {

private manualAirportSelection = false;

private readonly pposLatWord = Arinc429RegisterSubject.createEmpty();
// TODO: Should be using GPS position interpolated with IRS velocity data
private readonly pposLatWord = Arinc429LocalVarConsumerSubject.create(this.sub.on('latitude'));

private readonly pposLonWord = Arinc429RegisterSubject.createEmpty();
private readonly pposLongWord = Arinc429LocalVarConsumerSubject.create(this.sub.on('longitude'));

private presentPos = MappedSubject.create(
([lat, lon]) => {
return { lat: lat.value, long: lon.value } as Coordinates;
},
this.pposLatWord,
this.pposLonWord,
this.pposLongWord,
);

private presentPosNotAvailable = MappedSubject.create(
([lat, long]) => !lat.isNormalOperation() || !long.isNormalOperation(),
this.pposLatWord,
this.pposLongWord,
);

private readonly fmsDataStore = new FmsDataStore(this.props.bus);
Expand Down Expand Up @@ -208,13 +214,13 @@ export class OansControlPanel extends DisplayComponent<OansProps> {
NavigationDatabaseService.activeDatabase.getDatabaseIdent().then((db) => {
const from = new Date(db.effectiveFrom);
const to = new Date(db.effectiveTo);
this.activeDatabase.set(`${from.getDay()}${months[from.getMonth()]}-${to.getDay()}${months[to.getMonth()]}`);
this.activeDatabase.set(`${from.getDate()}${months[from.getMonth()]}-${to.getDate()}${months[to.getMonth()]}`);
});

NXDataStore.getAndSubscribe('NAVIGRAPH_ACCESS_TOKEN', () => this.loadOansDb());

this.subs.push(
this.props.isVisible.sub((it) => this.style.setValue('visibility', it ? 'visible' : 'hidden'), true),
this.props.isVisible.sub((it) => this.style.setValue('visibility', it ? 'inherit' : 'hidden'), true),
);

this.subs.push(
Expand Down Expand Up @@ -246,20 +252,6 @@ export class OansControlPanel extends DisplayComponent<OansProps> {
}, true),
);

this.sub
.on('latitude')
.whenChanged()
.handle((value) => {
this.pposLatWord.setWord(value);
});

this.sub
.on('longitude')
.whenChanged()
.handle((value) => {
this.pposLonWord.setWord(value);
});

this.fmsDataStore.landingRunway.sub(async (it) => {
// Set control panel display
if (it) {
Expand Down Expand Up @@ -301,12 +293,8 @@ export class OansControlPanel extends DisplayComponent<OansProps> {
.on('realTime')
.atFrequency(5)
.handle((_) => {
const ppos: Coordinates = { lat: 0, long: 0 };
ppos.lat = SimVar.GetSimVarValue('PLANE LATITUDE', 'Degrees');
ppos.long = SimVar.GetSimVarValue('PLANE LONGITUDE', 'Degrees');

if (this.arpCoordinates && ppos.lat && this.navigraphAvailable.get() === false) {
globalToAirportCoordinates(this.arpCoordinates, ppos, this.localPpos);
if (this.arpCoordinates && this.navigraphAvailable.get() === false) {
globalToAirportCoordinates(this.arpCoordinates, this.presentPos.get(), this.localPpos);
this.props.bus.getPublisher<FmsOansData>().pub('oansAirportLocalCoordinates', this.localPpos, true);
}
});
Expand Down Expand Up @@ -411,6 +399,11 @@ export class OansControlPanel extends DisplayComponent<OansProps> {
};

private autoLoadAirport() {
// If we don't have ppos, do not try to auto load
if (this.presentPosNotAvailable.get()) {
return;
}

// If airport has been manually selected, do not auto load.
if (
this.manualAirportSelection === true ||
Expand Down
76 changes: 44 additions & 32 deletions fbw-a380x/src/systems/instruments/src/ND/instrument.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import {
Clock,
ConsumerSubject,
FsBaseInstrument,
FSComponent,
FsInstrument,
Expand All @@ -29,8 +30,6 @@ import {
a380EfisZoomRangeSettings,
A380EfisZoomRangeValue,
Oanc,
OANC_RENDER_HEIGHT,
OANC_RENDER_WIDTH,
OansControlEvents,
ZOOM_TRANSITION_TIME_MS,
} from '@flybywiresim/oanc';
Expand Down Expand Up @@ -115,8 +114,6 @@ class NDInstrument implements FsInstrument {

private readonly controlPanelVisible = Subject.create(false);

private readonly oansMessageScreenRef = FSComponent.createRef<HTMLDivElement>();

private oansContextMenuItems: Subscribable<ContextMenuElement[]> = Subject.create([
{
name: 'ADD CROSS',
Expand Down Expand Up @@ -184,11 +181,11 @@ class NDInstrument implements FsInstrument {

private oansRef = FSComponent.createRef<Oanc<A380EfisZoomRangeValue>>();

private oansContainerRef = FSComponent.createRef<HTMLDivElement>();
private cursorVisible = Subject.create<boolean>(true);

private oansControlPanelContainerRef = FSComponent.createRef<HTMLDivElement>();
private readonly oansNotAvailable = ConsumerSubject.create(null, true);

private cursorVisible = Subject.create<boolean>(true);
private readonly oansShown = Subject.create(false);

constructor() {
const side: EfisSide = getDisplayIndex() === 1 ? 'L' : 'R';
Expand Down Expand Up @@ -252,23 +249,36 @@ class NDInstrument implements FsInstrument {
failed={Subject.create(false)}
>
<div
ref={this.oansContainerRef}
class="oanc-container"
style={`width: ${OANC_RENDER_WIDTH}px; height: ${OANC_RENDER_HEIGHT}px; overflow: hidden`}
style={{
display: this.oansShown.map((v) => (v ? 'block' : 'none')),
}}
>
<div ref={this.oansMessageScreenRef} class="oanc-message-screen" style="visibility: hidden;">
PLEASE WAIT
{/* This flag is rendered by the CDS so it lives here instead of in the OANC */}
<div
class="oanc-flag-container amber FontLarge"
style={{
visibility: this.oansNotAvailable.map((v) => (v ? 'inherit' : 'hidden')),
}}
>
NOT AVAIL
</div>

<div
style={{
display: this.oansNotAvailable.map((v) => (v ? 'none' : 'block')),
}}
>
<Oanc
bus={this.bus}
side={this.efisSide}
ref={this.oansRef}
contextMenuVisible={this.contextMenuVisible}
contextMenuX={this.contextMenuX}
contextMenuY={this.contextMenuY}
zoomValues={a380EfisZoomRangeSettings}
/>
</div>
<Oanc
bus={this.bus}
side={this.efisSide}
ref={this.oansRef}
messageScreenRef={this.oansMessageScreenRef}
contextMenuVisible={this.contextMenuVisible}
contextMenuX={this.contextMenuX}
contextMenuY={this.contextMenuY}
zoomValues={a380EfisZoomRangeSettings}
/>
</div>
<NDComponent bus={this.bus} side={this.efisSide} rangeValues={a380EfisRangeSettings} />
<ContextMenu
Expand All @@ -277,7 +287,11 @@ class NDInstrument implements FsInstrument {
idPrefix="contextMenu"
values={this.oansContextMenuItems}
/>
<div ref={this.oansControlPanelContainerRef}>
<div
style={{
display: this.oansShown.map((v) => (v ? 'block' : 'none')),
}}
>
<OansControlPanel
ref={this.controlPanelRef}
bus={this.bus}
Expand Down Expand Up @@ -328,6 +342,8 @@ class NDInstrument implements FsInstrument {

const sub = this.bus.getSubscriber<FcuSimVars & OansControlEvents>();

this.oansNotAvailable.setConsumer(sub.on('oansNotAvail'));

sub
.on('ndMode')
.whenChanged()
Expand All @@ -346,16 +362,12 @@ class NDInstrument implements FsInstrument {
}

private updateNdOansVisibility() {
if (this.oansContainerRef.getOrDefault()) {
if (this.efisCpRange === -1 && [EfisNdMode.PLAN, EfisNdMode.ARC, EfisNdMode.ROSE_NAV].includes(this.efisNdMode)) {
this.bus.getPublisher<OansControlEvents>().pub('ndShowOans', true);
this.oansContainerRef.instance.style.display = 'block';
this.oansControlPanelContainerRef.instance.style.display = 'block';
} else {
this.bus.getPublisher<OansControlEvents>().pub('ndShowOans', false);
this.oansContainerRef.instance.style.display = 'none';
this.oansControlPanelContainerRef.instance.style.display = 'none';
}
if (this.efisCpRange === -1 && [EfisNdMode.PLAN, EfisNdMode.ARC, EfisNdMode.ROSE_NAV].includes(this.efisNdMode)) {
this.bus.getPublisher<OansControlEvents>().pub('ndShowOans', true);
this.oansShown.set(true);
} else {
this.bus.getPublisher<OansControlEvents>().pub('ndShowOans', false);
this.oansShown.set(false);
}
}

Expand Down
Loading

0 comments on commit 196545f

Please sign in to comment.