Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(GPU): Implemented more realistic GPU handling #9470

Merged
merged 19 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ee32a20
feat(Common/GPU): Implemented more realistic GPU handling
Maximilian-Reuter Nov 9, 2024
7990b2c
Merge branch 'master' of https://github.com/flybywiresim/a32nx into n…
Maximilian-Reuter Nov 9, 2024
4403f57
fixed type error and added docs
Maximilian-Reuter Nov 9, 2024
13c16e9
fix another import
Maximilian-Reuter Nov 9, 2024
6a90d1e
Merge branch 'master' into newGpuLogic
alepouna Nov 10, 2024
a449e72
refactored publishers
Maximilian-Reuter Nov 12, 2024
cb44c43
Merge branch 'newGpuLogic' of https://github.com/Maximilian-Reuter/a3…
Maximilian-Reuter Nov 12, 2024
352b1ee
Merge branch 'master' into newGpuLogic
Maximilian-Reuter Nov 12, 2024
65d7994
fix typo
Maximilian-Reuter Nov 12, 2024
e004364
Merge branch 'newGpuLogic' of https://github.com/Maximilian-Reuter/a3…
Maximilian-Reuter Nov 12, 2024
6c63888
Merge branch 'master' of https://github.com/flybywiresim/a32nx into n…
Maximilian-Reuter Nov 15, 2024
9709ae8
added missing publishers
Maximilian-Reuter Nov 16, 2024
60a4175
added last missing publisher, promise!
Maximilian-Reuter Nov 16, 2024
e7f8919
implemented interception and corrected rust var name (interception do…
Maximilian-Reuter Nov 17, 2024
263570b
reverted interception
Maximilian-Reuter Nov 19, 2024
bf7e0bf
fixed missing prefix
Maximilian-Reuter Nov 22, 2024
01f1b43
Merge branch 'master' of https://github.com/flybywiresim/a32nx into n…
Maximilian-Reuter Nov 26, 2024
a1a5085
Merge branch 'master' into newGpuLogic
Maximilian-Reuter Nov 26, 2024
b995848
Merge branch 'master' into newGpuLogic
Maximilian-Reuter Nov 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 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. [GPU] Improved handling of ground power for more immersive use @Maximilian-Reuter (\_chaoz_)
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)
Expand Down
6 changes: 6 additions & 0 deletions fbw-a32nx/docs/a320-simvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -4236,6 +4236,12 @@ In the variables below, {number} should be replaced with one item in the set: {
| 0 | Left Seat |
| 1 | Right Seat |

- `L:A32NX_EXT_PWR_AVAIL:{number}`
- Bool
- If ground power is avail or not
- {number}
- 1

# Deprecated

- A32NX_EFIS_{side}_NAVAID_{1|2}_MODE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ The StepType also defines if the step is executed in normal mode, expedited mode
(L:A32NX_OVHD_APU_MASTER_SW_PB_IS_ON) (L:A32NX_OVHD_APU_MASTER_SW_PB_IS_ON) &&
(L:A32NX_ENGINE_STATE:1) 1 == ||
(L:A32NX_ENGINE_STATE:2) 1 == ||
(A:EXTERNAL POWER ON:1, BOOL) ||
(L:A32NX_OVHD_ELEC_EXT_PWR_PB_IS_ON) ||
</Condition>
<Action>
(A:EXTERNAL POWER ON:1, BOOL) ! if{
1 (>K:TOGGLE_EXTERNAL_POWER)
(L:A32NX_OVHD_ELEC_EXT_PWR_PB_IS_ON) ! if{
1 (>L:A32NX_OVHD_ELEC_EXT_PWR_PB_IS_ON)
}
</Action>
</Step>
Expand Down Expand Up @@ -266,8 +266,8 @@ The StepType also defines if the step is executed in normal mode, expedited mode
<Action>0 (&gt;L:A32NX_OVHD_APU_MASTER_SW_PB_IS_ON)</Action>
</Step>
<Step Name="EXT PWR Off" Type="STEP" Delay="3000">
<Condition>(A:EXTERNAL POWER ON:1, BOOL) !</Condition>
<Action>(A:EXTERNAL POWER ON:1, BOOL) if{ 1 (&gt;K:TOGGLE_EXTERNAL_POWER) }</Action>
<Condition>(L:A32NX_OVHD_ELEC_EXT_PWR_PB_IS_ON) !</Condition>
<Action>(L:A32NX_OVHD_ELEC_EXT_PWR_PB_IS_ON) if{ 1 (&gt;L:A32NX_OVHD_ELEC_EXT_PWR_PB_IS_ON) }</Action>
</Step>
<Step Name="BAT2 Off" Type="STEP" Delay="100">
<Condition>(L:A32NX_OVHD_ELEC_BAT_2_PB_IS_AUTO) 0 ==</Condition>
Expand Down Expand Up @@ -304,8 +304,8 @@ The StepType also defines if the step is executed in normal mode, expedited mode
<Procedure Name="PUSHBACK_CONFIG_ON">
<!-- SOP: BEFORE PUSHBACK AND START -->
<Step Name="EXT PWR Off" Type="STEP" Delay="3000">
<Condition>(A:EXTERNAL POWER ON:1, BOOL) !</Condition>
<Action>(A:EXTERNAL POWER ON:1, BOOL) if{ 1 (&gt;K:TOGGLE_EXTERNAL_POWER) }</Action>
<Condition>(L:A32NX_OVHD_ELEC_EXT_PWR_PB_IS_ON) !</Condition>
<Action>(L:A32NX_OVHD_ELEC_EXT_PWR_PB_IS_ON) if{ 0 (&gt;L:A32NX_OVHD_ELEC_EXT_PWR_PB_IS_ON) }</Action>
</Step>

<Step Name="Beacon On" Type="STEP" Delay="2000">
Expand Down
14 changes: 5 additions & 9 deletions fbw-a32nx/src/behavior/src/A32NX_Interior_Elec.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,17 @@

<UseTemplate Name="FBW_Push_Toggle">
<LEFT_SINGLE_CODE>
(A:EXTERNAL POWER AVAILABLE:#ID#, Bool) (A:EXTERNAL POWER ON:#ID#, Bool) ! and if{
#ID# (&gt;K:TOGGLE_EXTERNAL_POWER)
} els{
(A:EXTERNAL POWER ON:#ID#, Bool) if{
#ID# (&gt;K:TOGGLE_EXTERNAL_POWER)
}
(L:A32NX_EXT_PWR_AVAIL:#ID#, Bool) if{
(L:A32NX_OVHD_ELEC_EXT_PWR_PB_IS_ON, Bool) ! (&gt;L:A32NX_OVHD_ELEC_EXT_PWR_PB_IS_ON, Bool)
}
</LEFT_SINGLE_CODE>

<MOMENTARY />

<SEQ1_CODE>(A:EXTERNAL POWER AVAILABLE:#ID#, Bool) (A:EXTERNAL POWER ON:#ID#, Bool) ! and</SEQ1_CODE>
<SEQ2_CODE>(A:EXTERNAL POWER AVAILABLE:#ID#, Bool) (A:EXTERNAL POWER ON:#ID#, Bool) and</SEQ2_CODE>
<SEQ1_CODE>(L:A32NX_EXT_PWR_AVAIL:#ID#, Bool) (L:A32NX_OVHD_ELEC_EXT_PWR_PB_IS_ON, Bool) ! and</SEQ1_CODE>
<SEQ2_CODE>(L:A32NX_EXT_PWR_AVAIL:#ID#, Bool) (L:A32NX_OVHD_ELEC_EXT_PWR_PB_IS_ON, Bool) and</SEQ2_CODE>

<TOOLTIPID>%((A:EXTERNAL POWER AVAILABLE:1, Bool) 0 == )%{if}TT:COCKPIT.TOOLTIPS.UNAVAILABLE%{end} %((A:EXTERNAL POWER AVAILABLE:1, Bool) (A:EXTERNAL POWER ON:1, Bool) and)%{if}TT:COCKPIT.TOOLTIPS.EXT_PWR_OFF%{else}TT:COCKPIT.TOOLTIPS.EXT_PWR_ON%{end}</TOOLTIPID>
<TOOLTIPID>%((L:A32NX_EXT_PWR_AVAIL:#ID#, Bool) 0 == )%{if}TT:COCKPIT.TOOLTIPS.UNAVAILABLE%{end} %((L:A32NX_EXT_PWR_AVAIL:#ID#, Bool) (L:A32NX_OVHD_ELEC_EXT_PWR_PB_IS_ON, Bool) and)%{if}TT:COCKPIT.TOOLTIPS.EXT_PWR_OFF%{else}TT:COCKPIT.TOOLTIPS.EXT_PWR_ON%{end}</TOOLTIPID>
</UseTemplate>
</Template>

Expand Down
40 changes: 33 additions & 7 deletions fbw-a32nx/src/systems/extras-host/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,17 @@
// SPDX-License-Identifier: GPL-3.0

import { Clock, EventBus, HEventPublisher, InstrumentBackplane } from '@microsoft/msfs-sdk';
import { FlightDeckBounds, NotificationManager, PilotSeatManager } from '@flybywiresim/fbw-sdk';
import { ExtrasSimVarPublisher } from 'extras-host/modules/common/ExtrasSimVarPublisher';
import {
ExtrasSimVarPublisher,
FlightDeckBounds,
GPUManagement,
GroundSupportPublisher,
MsfsElectricsPublisher,
MsfsFlightModelPublisher,
MsfsMiscPublisher,
NotificationManager,
PilotSeatManager,
} from '@flybywiresim/fbw-sdk';
import { PushbuttonCheck } from 'extras-host/modules/pushbutton_check/PushbuttonCheck';
import { FlightPlanAsoboSync } from 'extras-host/modules/flightplan_sync/FlightPlanAsoboSync';
import { KeyInterceptor } from './modules/key_interceptor/KeyInterceptor';
Expand Down Expand Up @@ -58,6 +67,14 @@ class ExtrasHost extends BaseInstrument {

private readonly simVarPublisher: ExtrasSimVarPublisher;

private readonly msfsElectricsPublisher: MsfsElectricsPublisher;

private readonly msfsFlightModelPublisher: MsfsFlightModelPublisher;

private readonly msfsMiscPublisher: MsfsMiscPublisher;

private readonly groundSupportPublisher: GroundSupportPublisher;

private readonly pushbuttonCheck: PushbuttonCheck;

private readonly versionCheck: VersionCheck;
Expand All @@ -71,6 +88,8 @@ class ExtrasHost extends BaseInstrument {
private readonly pilotSeatManager = new PilotSeatManager(ExtrasHost.flightDeckBounds);

public readonly xmlConfig: Document;
/**interactionpoint 8 is GPU connection and 1 GPU in total */
private readonly gpuManagement = new GPUManagement(this.bus, 8, 1);

private readonly lightSync: LightSync = new LightSync(this.bus);

Expand All @@ -85,9 +104,12 @@ class ExtrasHost extends BaseInstrument {
constructor() {
super();

this.bus = new EventBus();
this.hEventPublisher = new HEventPublisher(this.bus);
this.simVarPublisher = new ExtrasSimVarPublisher(this.bus);
this.msfsElectricsPublisher = new MsfsElectricsPublisher(this.bus);
this.msfsFlightModelPublisher = new MsfsFlightModelPublisher(this.bus);
this.msfsMiscPublisher = new MsfsMiscPublisher(this.bus);
this.groundSupportPublisher = new GroundSupportPublisher(this.bus);

this.notificationManager = new NotificationManager(this.bus);

Expand All @@ -98,8 +120,15 @@ class ExtrasHost extends BaseInstrument {
this.versionCheck = new VersionCheck(process.env.AIRCRAFT_PROJECT_PREFIX, this.bus);
this.aircraftSync = new AircraftSync(process.env.AIRCRAFT_PROJECT_PREFIX, this.bus);

this.backplane.addInstrument('Clock', this.clock);
this.backplane.addPublisher('SimvarPublisher', this.simVarPublisher);
this.backplane.addPublisher('MsfsElectricsPublisher', this.msfsElectricsPublisher);
this.backplane.addPublisher('MsfsFlightModelPublisher', this.msfsFlightModelPublisher);
this.backplane.addPublisher('MsfsMiscPublisher', this.msfsMiscPublisher);
this.backplane.addPublisher('GroundSupportPublisher', this.groundSupportPublisher);

this.backplane.addInstrument('PilotSeatManager', this.pilotSeatManager);
this.backplane.addInstrument('GPUManagement', this.gpuManagement);
this.backplane.addInstrument('Clock', this.clock);
this.backplane.addInstrument('LightSync', this.lightSync);

console.log('A32NX_EXTRASHOST: Created');
Expand Down Expand Up @@ -143,13 +172,10 @@ class ExtrasHost extends BaseInstrument {
this.hEventPublisher.startPublish();
this.versionCheck.startPublish();
this.keyInterceptor.startPublish();
this.simVarPublisher.startPublish();
this.flightPlanAsoboSync.init();
this.aircraftSync.startPublish();
}
this.gameState = gs;
} else {
this.simVarPublisher.onUpdate();
}

this.versionCheck.update();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// SPDX-License-Identifier: GPL-3.0

import { ConsumerSubject, DebounceTimer, EventBus, MappedSubject } from '@microsoft/msfs-sdk';
import { NotificationManager, NotificationTheme } from '@flybywiresim/fbw-sdk';
import { ExtrasSimVarEvents } from 'extras-host/modules/common/ExtrasSimVarPublisher';
import { NotificationManager, NotificationTheme, ExtrasSimVarEvents } from '@flybywiresim/fbw-sdk';

/**
* Monitors cockpit pushbuttons that may be written externally to ensure they are not "stuck" because
Expand Down
3 changes: 2 additions & 1 deletion fbw-a32nx/src/systems/instruments/src/EFB/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { AutomaticCallOutsPage } from './Pages/AutomaticCallOutsPage';
import { a32nxSyncedSettings } from 'instruments/src/EFB/settingsSync';

import './Efb.scss';
import { EventBus } from '@microsoft/msfs-sdk';

function aircraftEfbSetup(): void {
syncSettingsFromPersistentStorage(a32nxSyncedSettings);
Expand Down Expand Up @@ -72,7 +73,7 @@ render(
},
}}
>
<EfbWrapper failures={A320FailureDefinitions} aircraftSetup={aircraftEfbSetup} />
<EfbWrapper failures={A320FailureDefinitions} aircraftSetup={aircraftEfbSetup} eventBus={new EventBus()} />
</AircraftContext.Provider>,
true,
true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const ElecPage = () => {
const [ac2IsPowered] = useSimVar('L:A32NX_ELEC_AC_2_BUS_IS_POWERED', 'Bool', maxStaleness);
const [acEssIsPowered] = useSimVar('L:A32NX_ELEC_AC_ESS_BUS_IS_POWERED', 'Bool', maxStaleness);
const [acEssShedBusIsPowered] = useSimVar('L:A32NX_ELEC_AC_ESS_SHED_BUS_IS_POWERED', 'Bool', maxStaleness);
const [externalPowerAvailable] = useSimVar('EXTERNAL POWER AVAILABLE:1', 'Bool', maxStaleness);
const [externalPowerAvailable] = useSimVar('L:A32NX_EXT_PWR_AVAIL:1', 'Bool', maxStaleness);
const [staticInverterInUse] = useSimVar('L:A32NX_ELEC_CONTACTOR_15XE2_IS_CLOSED', 'Bool', maxStaleness);
const [galleyIsShed] = useSimVar('L:A32NX_ELEC_GALLEY_IS_SHED', 'Bool', maxStaleness);
const [tr1SuppliesDc1] = useSimVar('L:A32NX_ELEC_CONTACTOR_5PU1_IS_CLOSED', 'Bool', maxStaleness);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2601,7 +2601,7 @@ mod a320_electrical_circuit_tests {
}

fn connected_external_power(mut self) -> Self {
self.write_by_name("EXTERNAL POWER AVAILABLE:1", true);
self.write_by_name("EXT_PWR_AVAIL:1", true);

self.without_triggering_emergency_elec(|x| x.run())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6914,7 +6914,7 @@ mod tests {
}

fn external_power(mut self, is_connected: bool) -> Self {
self.write_by_name("EXTERNAL POWER AVAILABLE:1", is_connected);
self.write_by_name("EXT_PWR_AVAIL:1", is_connected);

if is_connected {
self = self.on_the_ground();
Expand Down
7 changes: 1 addition & 6 deletions fbw-a32nx/src/wasm/systems/a320_systems_wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ async fn systems(mut gauge: msfs::Gauge) -> Result<(), Box<dyn Error>> {
.provides_aircraft_variable("CONTACT POINT COMPRESSION", "Percent", 0)?
.provides_aircraft_variable("CONTACT POINT COMPRESSION", "Percent", 1)?
.provides_aircraft_variable("CONTACT POINT COMPRESSION", "Percent", 2)?
.provides_aircraft_variable("EXTERNAL POWER AVAILABLE", "Bool", 1)?
.provides_aircraft_variable("FUEL TANK CENTER QUANTITY", "gallons", 0)?
.provides_aircraft_variable("FUEL TANK LEFT MAIN QUANTITY", "gallons", 0)?
.provides_aircraft_variable("FUEL TANK LEFT AUX QUANTITY", "gallons", 0)?
Expand Down Expand Up @@ -415,13 +414,9 @@ async fn systems(mut gauge: msfs::Gauge) -> Result<(), Box<dyn Error>> {
Variable::aspect("OVHD_ELEC_APU_GEN_PB_IS_ON"),
);
builder.copy(
Variable::aircraft("EXTERNAL POWER AVAILABLE", "Bool", 1),
Variable::named("EXT_PWR_AVAIL:1"),
Variable::aspect("OVHD_ELEC_EXT_PWR_PB_IS_AVAILABLE"),
);
builder.copy(
Variable::aircraft("EXTERNAL POWER ON", "Bool", 1),
Variable::aspect("OVHD_ELEC_EXT_PWR_PB_IS_ON"),
);

builder.copy(
Variable::aircraft("GENERAL ENG MASTER ALTERNATOR", "Bool", 1),
Expand Down
6 changes: 6 additions & 0 deletions fbw-a380x/docs/a380-simvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -1085,3 +1085,9 @@
|-------|-------------|
| 0 | Left Seat |
| 1 | Right Seat |

- `L:A32NX_EXT_PWR_AVAIL:{number}`
- Bool
- If ground power is avail or not
- {number}
- 1 - 4
Original file line number Diff line number Diff line change
Expand Up @@ -1753,7 +1753,7 @@
<NODE_ID>PUSH_OVHD_ELEC_EXTPWR</NODE_ID>
<PART_ID>ELECTRICAL_Switch_ExternalPower</PART_ID>
<ID>1</ID>
<SEQ1_POWERED>(A:EXTERNAL POWER AVAILABLE:1, Bool) (L:A32NX_ELEC_DC_1_BUS_IS_POWERED, Bool) or</SEQ1_POWERED>
<SEQ1_POWERED>(L:A32NX_EXT_PWR_AVAIL:1, Bool) (L:A32NX_ELEC_DC_1_BUS_IS_POWERED, Bool) or</SEQ1_POWERED>
<SEQ2_POWERED>(L:A32NX_ELEC_DC_ESS_BUS_IS_POWERED, Bool)</SEQ2_POWERED>
<SEQ2_EMISSIVE_DRIVES_VISIBILITY>False</SEQ2_EMISSIVE_DRIVES_VISIBILITY>
<SEQ1_CODE_DRIVES_VISIBILITY>False</SEQ1_CODE_DRIVES_VISIBILITY>
Expand All @@ -1765,7 +1765,7 @@
<NODE_ID>PUSH_OVHD_ELEC_EXTPWR2</NODE_ID>
<PART_ID>ELECTRICAL_Switch_ExternalPower</PART_ID>
<ID>2</ID>
<SEQ1_POWERED>(A:EXTERNAL POWER AVAILABLE:2, Bool) (L:A32NX_ELEC_DC_1_BUS_IS_POWERED, Bool) or</SEQ1_POWERED>
<SEQ1_POWERED>(L:A32NX_EXT_PWR_AVAIL:2, Bool) (L:A32NX_ELEC_DC_1_BUS_IS_POWERED, Bool) or</SEQ1_POWERED>
<SEQ2_POWERED>(L:A32NX_ELEC_DC_ESS_BUS_IS_POWERED, Bool)</SEQ2_POWERED>
<SEQ2_EMISSIVE_DRIVES_VISIBILITY>False</SEQ2_EMISSIVE_DRIVES_VISIBILITY>
<SEQ1_CODE_DRIVES_VISIBILITY>False</SEQ1_CODE_DRIVES_VISIBILITY>
Expand All @@ -1777,7 +1777,7 @@
<NODE_ID>PUSH_OVHD_ELEC_EXTPWR3</NODE_ID>
<PART_ID>ELECTRICAL_Switch_ExternalPower</PART_ID>
<ID>3</ID>
<SEQ1_POWERED>(A:EXTERNAL POWER AVAILABLE:3, Bool) (L:A32NX_ELEC_DC_2_BUS_IS_POWERED, Bool) or</SEQ1_POWERED>
<SEQ1_POWERED>(L:A32NX_EXT_PWR_AVAIL:3, Bool) (L:A32NX_ELEC_DC_2_BUS_IS_POWERED, Bool) or</SEQ1_POWERED>
<SEQ2_POWERED>(L:A32NX_ELEC_DC_ESS_BUS_IS_POWERED, Bool)</SEQ2_POWERED>
<SEQ2_EMISSIVE_DRIVES_VISIBILITY>False</SEQ2_EMISSIVE_DRIVES_VISIBILITY>
<SEQ1_CODE_DRIVES_VISIBILITY>False</SEQ1_CODE_DRIVES_VISIBILITY>
Expand All @@ -1789,7 +1789,7 @@
<NODE_ID>PUSH_OVHD_ELEC_EXTPWR4</NODE_ID>
<PART_ID>ELECTRICAL_Switch_ExternalPower</PART_ID>
<ID>4</ID>
<SEQ1_POWERED>(A:EXTERNAL POWER AVAILABLE:4, Bool) (L:A32NX_ELEC_DC_2_BUS_IS_POWERED, Bool) or</SEQ1_POWERED>
<SEQ1_POWERED>(L:A32NX_EXT_PWR_AVAIL:4, Bool) (L:A32NX_ELEC_DC_2_BUS_IS_POWERED, Bool) or</SEQ1_POWERED>
<SEQ2_POWERED>(L:A32NX_ELEC_DC_ESS_BUS_IS_POWERED, Bool)</SEQ2_POWERED>
<SEQ2_EMISSIVE_DRIVES_VISIBILITY>False</SEQ2_EMISSIVE_DRIVES_VISIBILITY>
<SEQ1_CODE_DRIVES_VISIBILITY>False</SEQ1_CODE_DRIVES_VISIBILITY>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,17 @@

<UseTemplate Name="FBW_Push_Toggle">
<LEFT_SINGLE_CODE>
(A:EXTERNAL POWER AVAILABLE:#ID#, Bool) (A:EXTERNAL POWER ON:#ID#, Bool) ! and if{
#ID# (&gt;K:TOGGLE_EXTERNAL_POWER)
} els{
(A:EXTERNAL POWER ON:#ID#, Bool) if{
#ID# (&gt;K:TOGGLE_EXTERNAL_POWER)
}
(L:A32NX_EXT_PWR_AVAIL:#ID#, Bool) if{
(L:A32NX_OVHD_ELEC_EXT_PWR_#ID#_PB_IS_ON, Bool) ! (&gt;L:A32NX_OVHD_ELEC_EXT_PWR_#ID#_PB_IS_ON, Bool)
}
</LEFT_SINGLE_CODE>

<MOMENTARY/>

<SEQ1_CODE>(A:EXTERNAL POWER AVAILABLE:#ID#, Bool) (A:EXTERNAL POWER ON:#ID#, Bool) ! and</SEQ1_CODE>
<SEQ2_CODE>(A:EXTERNAL POWER AVAILABLE:#ID#, Bool) (A:EXTERNAL POWER ON:#ID#, Bool) and</SEQ2_CODE>
<SEQ1_CODE>(L:A32NX_EXT_PWR_AVAIL:#ID#, Bool) (L:A32NX_OVHD_ELEC_EXT_PWR_#ID#_PB_IS_ON, Bool) ! and</SEQ1_CODE>
<SEQ2_CODE>(L:A32NX_EXT_PWR_AVAIL:#ID#, Bool) (L:A32NX_OVHD_ELEC_EXT_PWR_#ID#_PB_IS_ON, Bool) and</SEQ2_CODE>

<TOOLTIPID>%((A:EXTERNAL POWER AVAILABLE:1, Bool) 0 == )%{if}TT:COCKPIT.TOOLTIPS.UNAVAILABLE%{end} %((A:EXTERNAL POWER AVAILABLE:1, Bool) (A:EXTERNAL POWER ON:1, Bool) and)%{if}TT:COCKPIT.TOOLTIPS.EXT_PWR_OFF%{else}TT:COCKPIT.TOOLTIPS.EXT_PWR_ON%{end}</TOOLTIPID>
<TOOLTIPID>%((L:A32NX_EXT_PWR_AVAIL:#ID#, Bool) 0 == )%{if}TT:COCKPIT.TOOLTIPS.UNAVAILABLE%{end} %((L:A32NX_EXT_PWR_AVAIL:#ID#, Bool) (L:A32NX_OVHD_ELEC_EXT_PWR_#ID#_PB_IS_ON, Bool) and)%{if}TT:COCKPIT.TOOLTIPS.EXT_PWR_OFF%{else}TT:COCKPIT.TOOLTIPS.EXT_PWR_ON%{end}</TOOLTIPID>
</UseTemplate>
</Template>

Expand Down
Loading