Skip to content

Commit

Permalink
fix(sd): fix apu bleed pressure indication (flybywiresim#8201)
Browse files Browse the repository at this point in the history
* Fix LVAR name

* Update changelog
  • Loading branch information
BlueberryKing authored Sep 11, 2023
1 parent f3e5f89 commit 9e96d56
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
1. [BLEED] Improve bleed page visuals on the SD - @BlueberryKing (BlueberryKing)
1. [BLEED] Use more accurate pneumatic valves and sensors - @BlueberryKing (BlueberryKing)
1. [EFB] flyPad OS 3.2 - Cosmetic changes for throttle configuration settings and support for multiple airframes - @2hwk (2cas)
1. [SD] Connect SD BLEED page APU bleed pressure indication to correct ADRs - @BlueberryKing (BlueberryKing)

## 0.10.0

Expand Down
7 changes: 6 additions & 1 deletion fbw-a32nx/src/systems/instruments/src/SD/Pages/Apu/Apu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,12 @@ const ApuBleed = ({ x, y } : ComponentPositionProps) => {
const [apuBleedOpen] = useSimVar('L:A32NX_APU_BLEED_AIR_VALVE_OPEN', 'Bool', 1000);
const [apuBleedPressure] = useSimVar('L:APU_BLEED_PRESSURE', 'PSI', 1000);
const displayedBleedPressure = Math.round(apuBleedPressure / 2) * 2; // APU bleed pressure is shown in steps of two.
const correctedAverageStaticPressure = useArinc429Var('A32NX_ADIRS_ADR_1_CORRECTED_AVERAGE_STATIC_PRESSURE');
// This assumes that the SD is displayed by DMC 1, which is the case during normal operation.
const [attHdgPosition] = useSimVar('L:A32NX_ATT_HDG_SWITCHING_KNOB', 'Position', 100);
const adrSource = attHdgPosition === 0 ? 3 : 1;
const correctedAverageStaticPressure = useArinc429Var(`L:A32NX_ADIRS_ADR_${adrSource}_CORRECTED_AVERAGE_STATIC_PRESSURE`, 100);
const apuN = useArinc429Var('L:A32NX_APU_N', 100);

useEffect(() => {
if (apuBleedPbOn) {
const timeout = setTimeout(() => {
Expand All @@ -157,6 +161,7 @@ const ApuBleed = ({ x, y } : ComponentPositionProps) => {

return () => {};
}, [apuBleedPbOn]);

// FIXME should be APU bleed absolute pressure label from SDAC
const apuBleedPressAvailable = apuN.isNormalOperation() && correctedAverageStaticPressure.isNormalOperation();
return (
Expand Down

0 comments on commit 9e96d56

Please sign in to comment.