From ed8aaa470446fc942009f22ca9054275660dd245 Mon Sep 17 00:00:00 2001 From: flogross89 <63071941+flogross89@users.noreply.github.com> Date: Fri, 3 Jan 2025 02:53:47 +0100 Subject: [PATCH] keep AUTOPILOT_OFF event --- fbw-a32nx/src/behavior/src/A32NX_Interior_Misc.xml | 1 + .../systems/systems-host/systems/FWC/PseudoFWC.ts | 14 +------------- .../src/wasm/fbw_a320/src/FlyByWireInterface.cpp | 2 +- .../legacy/generated/A32NX_Interior_Misc.xml | 1 + .../systems/FlightWarningSystem/FwsCore.ts | 14 +------------- 5 files changed, 5 insertions(+), 27 deletions(-) diff --git a/fbw-a32nx/src/behavior/src/A32NX_Interior_Misc.xml b/fbw-a32nx/src/behavior/src/A32NX_Interior_Misc.xml index 6169f91635b..20d2b8b2ec8 100644 --- a/fbw-a32nx/src/behavior/src/A32NX_Interior_Misc.xml +++ b/fbw-a32nx/src/behavior/src/A32NX_Interior_Misc.xml @@ -368,6 +368,7 @@ %((L:A32NX_AUTOPILOT_ACTIVE, Bool))%{if}Disc. Autopilot%{else}Take priority%{end} + (>K:AUTOPILOT_OFF) 1 (>L:A32NX_PRIORITY_TAKEOVER:#ID#) diff --git a/fbw-a32nx/src/systems/systems-host/systems/FWC/PseudoFWC.ts b/fbw-a32nx/src/systems/systems-host/systems/FWC/PseudoFWC.ts index d9f223eadec..4266ca34ee1 100644 --- a/fbw-a32nx/src/systems/systems-host/systems/FWC/PseudoFWC.ts +++ b/fbw-a32nx/src/systems/systems-host/systems/FWC/PseudoFWC.ts @@ -125,7 +125,6 @@ export class PseudoFWC { public readonly recallButtonInputBuffer = new NXLogicMemoryNode(false); public readonly aThrDiscInputBuffer = new NXLogicMemoryNode(false); public readonly apDiscInputBuffer = new NXLogicMemoryNode(false); - public readonly takeoverPbInputBuffer = new NXLogicMemoryNode(false); /* PSEUDO FWC VARIABLES */ private readonly startupTimer = new DebounceTimer(); @@ -1264,13 +1263,6 @@ export class PseudoFWC { this.recallButtonInputBuffer.write(true, false); } - if ( - SimVar.GetSimVarValue('L:A32NX_PRIORITY_TAKEOVER:1', SimVarValueType.Bool) || - SimVar.GetSimVarValue('L:A32NX_PRIORITY_TAKEOVER:2', SimVarValueType.Bool) - ) { - this.takeoverPbInputBuffer.write(true, false); - } - // Enforce cycle time for the logic computation (otherwise pulse nodes would be broken) if (deltaTime === -1 || _deltaTime === 0) { return; @@ -1285,10 +1277,7 @@ export class PseudoFWC { this.clr2PulseNode.write(this.clearButtonInputBuffer.read(), deltaTime); this.rclUpPulseNode.write(this.recallButtonInputBuffer.read(), deltaTime); this.autoThrustInstinctiveDiscPressed.write(this.aThrDiscInputBuffer.read(), deltaTime); - this.autoPilotInstinctiveDiscPressedPulse.write( - this.apDiscInputBuffer.read() || this.takeoverPbInputBuffer.read(), - deltaTime, - ); + this.autoPilotInstinctiveDiscPressedPulse.write(this.apDiscInputBuffer.read(), deltaTime); // Inputs update this.flightPhaseEndedPulseNode.write(false, deltaTime); @@ -2915,7 +2904,6 @@ export class PseudoFWC { this.recallButtonInputBuffer.write(false, true); this.aThrDiscInputBuffer.write(false, true); this.apDiscInputBuffer.write(false, true); - this.takeoverPbInputBuffer.write(false, true); this.autoPilotInstinctiveDiscCountSinceLastFwsCycle = 0; } diff --git a/fbw-a32nx/src/wasm/fbw_a320/src/FlyByWireInterface.cpp b/fbw-a32nx/src/wasm/fbw_a320/src/FlyByWireInterface.cpp index b81e6b791b0..deb3e49da1e 100644 --- a/fbw-a32nx/src/wasm/fbw_a320/src/FlyByWireInterface.cpp +++ b/fbw-a32nx/src/wasm/fbw_a320/src/FlyByWireInterface.cpp @@ -1736,7 +1736,7 @@ bool FlyByWireInterface::updateFmgc(double sampleTime, int fmgcIndex) { fmgcs[fmgcIndex].modelInputs.in.sim_data.tailstrike_protection_on = tailstrikeProtectionEnabled; bool athr_instinctive_disc = simConnectInterface.getSimInputThrottles().ATHR_disconnect || idAutothrustDisconnect->get() == 1; - bool ap_instinctive_disc = simInputAutopilot.AP_disconnect || idCaptPriorityButtonPressed->get() || idFoPriorityButtonPressed->get(); + bool ap_instinctive_disc = simInputAutopilot.AP_disconnect; fmgcs[fmgcIndex].modelInputs.in.discrete_inputs.is_unit_1 = fmgcIndex == 0; fmgcs[fmgcIndex].modelInputs.in.discrete_inputs.athr_opp_engaged = fmgcsDiscreteOutputs[oppFmgcIndex].athr_own_engaged; diff --git a/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/model/behaviour/legacy/generated/A32NX_Interior_Misc.xml b/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/model/behaviour/legacy/generated/A32NX_Interior_Misc.xml index afb32d4c23f..8696240c05c 100644 --- a/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/model/behaviour/legacy/generated/A32NX_Interior_Misc.xml +++ b/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/model/behaviour/legacy/generated/A32NX_Interior_Misc.xml @@ -382,6 +382,7 @@ %((L:A32NX_AUTOPILOT_ACTIVE, Bool))%{if}Disc. Autopilot%{else}Take priority%{end} + (>K:AUTOPILOT_OFF) 1 (>L:A32NX_PRIORITY_TAKEOVER:#ID#) diff --git a/fbw-a380x/src/systems/systems-host/systems/FlightWarningSystem/FwsCore.ts b/fbw-a380x/src/systems/systems-host/systems/FlightWarningSystem/FwsCore.ts index 71b4a4297c3..9d4cf36fa3b 100644 --- a/fbw-a380x/src/systems/systems-host/systems/FlightWarningSystem/FwsCore.ts +++ b/fbw-a380x/src/systems/systems-host/systems/FlightWarningSystem/FwsCore.ts @@ -206,7 +206,6 @@ export class FwsCore { public readonly clDownInputBuffer = new NXLogicMemoryNode(false); public readonly aThrDiscInputBuffer = new NXLogicMemoryNode(false); public readonly apDiscInputBuffer = new NXLogicMemoryNode(false); - public readonly takeoverPbInputBuffer = new NXLogicMemoryNode(false); /* PSEUDO FWC VARIABLES */ @@ -1817,13 +1816,6 @@ export class FwsCore { this.clDownInputBuffer.write(true, false); } - if ( - SimVar.GetSimVarValue('L:A32NX_PRIORITY_TAKEOVER:1', SimVarValueType.Bool) || - SimVar.GetSimVarValue('L:A32NX_PRIORITY_TAKEOVER:2', SimVarValueType.Bool) - ) { - this.takeoverPbInputBuffer.write(true, false); - } - // Enforce cycle time for the logic computation (otherwise pulse nodes would be broken) if (deltaTime === -1 || _deltaTime === 0) { return; @@ -1847,10 +1839,7 @@ export class FwsCore { this.clUpPulseNode.write(this.clUpInputBuffer.read(), deltaTime); this.clDownPulseNode.write(this.clDownInputBuffer.read(), deltaTime); this.autoThrustInstinctiveDiscPressed.write(this.aThrDiscInputBuffer.read(), deltaTime); - this.autoPilotInstinctiveDiscPressedPulse.write( - this.apDiscInputBuffer.read() || this.takeoverPbInputBuffer.read(), - deltaTime, - ); + this.autoPilotInstinctiveDiscPressedPulse.write(this.apDiscInputBuffer.read(), deltaTime); // Inputs update this.flightPhaseEndedPulseNode.write(false, deltaTime); @@ -4154,7 +4143,6 @@ export class FwsCore { this.clDownInputBuffer.write(false, true); this.aThrDiscInputBuffer.write(false, true); this.apDiscInputBuffer.write(false, true); - this.takeoverPbInputBuffer.write(false, true); this.autoPilotInstinctiveDiscCountSinceLastFwsCycle = 0; }