Skip to content

Commit

Permalink
fix(a380x): Various fixes for FCU, MFD, ND, lighting (#8901)
Browse files Browse the repository at this point in the history
* RMP power supply

* fix ECAM CP & KCCU integ lt potentiometer

* change FCU color

* light fixes: integ lights, ambient light jump at 0.5

* remove WASM backlight bleed

* reduce fmgc/MFD debug messages

* try to fix HOLDs

* remove debug messages

* fix ND WASM fix
  • Loading branch information
flogross89 authored Sep 16, 2024
1 parent 0ec66ef commit 4d54f0d
Show file tree
Hide file tree
Showing 33 changed files with 269 additions and 164 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class GuidanceController {

private windProfileFactory: WindProfileFactory;

private atmosphericConditions: AtmosphericConditions;
public atmosphericConditions: AtmosphericConditions;

private readonly flightPhase = ConsumerValue.create(
this.bus.getSubscriber<FlightPhaseManagerEvents>().on('fmgc_flight_phase'),
Expand Down
16 changes: 8 additions & 8 deletions fbw-a32nx/src/systems/fmgc/src/guidance/lnav/PseudoWaypoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ export class PseudoWaypoints implements GuidanceComponent {
) {}

acceptVerticalProfile() {
if (DEBUG) {
if (VnavConfig.DEBUG_PROFILE) {
console.log('[FMS/PWP] Computed new pseudo waypoints because of new vertical profile.');
}
this.recompute();
}

acceptMultipleLegGeometry(_geometry: Geometry) {
if (DEBUG) {
if (VnavConfig.DEBUG_PROFILE) {
console.log('[FMS/PWP] Computed new pseudo waypoints because of new lateral geometry.');
}
this.recompute();
Expand Down Expand Up @@ -220,7 +220,7 @@ export class PseudoWaypoints implements GuidanceComponent {
* @param pseudoWaypoint the {@link PseudoWaypoint} to sequence.
*/
sequencePseudoWaypoint(pseudoWaypoint: PseudoWaypoint): void {
if (DEBUG) {
if (VnavConfig.DEBUG_GUIDANCE) {
console.log(`[FMS/PseudoWaypoints] Pseudo-waypoint '${pseudoWaypoint.ident}' sequenced.`);
}

Expand Down Expand Up @@ -265,7 +265,7 @@ export class PseudoWaypoints implements GuidanceComponent {
return undefined;
}

if (DEBUG) {
if (VnavConfig.DEBUG_PROFILE) {
console.log(`[FMS/PWP] Starting placement of PWP '${debugString}': dist: ${distanceFromEnd.toFixed(2)}nm`);
}

Expand Down Expand Up @@ -296,7 +296,7 @@ export class PseudoWaypoints implements GuidanceComponent {
let lla: Coordinates | undefined;
if (distanceFromEndOfLeg > totalLegPathLength) {
// PWP in disco
if (DEBUG) {
if (VnavConfig.DEBUG_PROFILE) {
console.log(
`[FMS/PWP] Placed PWP '${debugString}' in discontinuity before leg #${i} (${distanceFromEndOfLeg.toFixed(2)}nm before end)`,
);
Expand All @@ -307,7 +307,7 @@ export class PseudoWaypoints implements GuidanceComponent {
// Point is in outbound transition segment
const distanceBeforeTerminator = distanceFromEndOfLeg;

if (DEBUG) {
if (VnavConfig.DEBUG_PROFILE) {
console.log(
`[FMS/PWP] Placed PWP '${debugString}' on leg #${i} outbound segment (${distanceFromEndOfLeg.toFixed(2)}nm before end)`,
);
Expand All @@ -321,7 +321,7 @@ export class PseudoWaypoints implements GuidanceComponent {
// Point is in leg segment
const distanceBeforeTerminator = distanceFromEndOfLeg - outboundTransLength;

if (DEBUG) {
if (VnavConfig.DEBUG_PROFILE) {
console.log(
`[FMS/PWP] Placed PWP '${debugString}' on leg #${i} leg segment (${distanceBeforeTerminator.toFixed(2)}nm before end)`,
);
Expand All @@ -332,7 +332,7 @@ export class PseudoWaypoints implements GuidanceComponent {
// Point is in inbound transition segment
const distanceBeforeTerminator = distanceFromEndOfLeg - outboundTransLength - legPartLength;

if (DEBUG) {
if (VnavConfig.DEBUG_PROFILE) {
console.log(
`[FMS/PWP] Placed PWP '${debugString}' on leg #${i} inbound segment (${distanceBeforeTerminator.toFixed(2)}nm before end)`,
);
Expand Down
19 changes: 10 additions & 9 deletions fbw-a32nx/src/systems/fmgc/src/guidance/lnav/TransitionPicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { CDLeg } from '@fmgc/guidance/lnav/legs/CD';
import { FDLeg } from '@fmgc/guidance/lnav/legs/FD';
import { FMLeg } from '@fmgc/guidance/lnav/legs/FM';
import { FALeg } from '@fmgc/guidance/lnav/legs/FA';
import { LnavConfig } from '@fmgc/guidance/LnavConfig';

export class TransitionPicker {
static forLegs(from: Leg, to: Leg): Transition | null {
Expand Down Expand Up @@ -107,7 +108,7 @@ export class TransitionPicker {
return new CourseCaptureTransition(from, to);
}

if (DEBUG) {
if (LnavConfig.DEBUG_GEOMETRY) {
console.error(`Illegal sequence CALeg -> ${to.constructor.name}`);
}

Expand Down Expand Up @@ -182,7 +183,7 @@ export class TransitionPicker {
return new CourseCaptureTransition(from, to);
}

if (DEBUG) {
if (LnavConfig.DEBUG_GEOMETRY) {
console.error(`Illegal sequence AFLEg -> ${to.constructor.name}`);
}

Expand Down Expand Up @@ -234,7 +235,7 @@ export class TransitionPicker {
return new CourseCaptureTransition(from, to);
}

if (DEBUG) {
if (LnavConfig.DEBUG_GEOMETRY) {
console.error(`Illegal sequence CFLeg -> ${to.constructor.name}`);
}

Expand All @@ -259,7 +260,7 @@ export class TransitionPicker {
return new FixedRadiusTransition(from, to);
}

if (DEBUG) {
if (LnavConfig.DEBUG_GEOMETRY) {
console.error(`Illegal sequence CILeg -> ${to.constructor.name}`);
}

Expand Down Expand Up @@ -476,7 +477,7 @@ export class TransitionPicker {
return new CourseCaptureTransition(from, to);
}

if (DEBUG) {
if (LnavConfig.DEBUG_GEOMETRY) {
console.error(`Illegal sequence CRLeg -> ${to.constructor.name}`);
}

Expand All @@ -502,7 +503,7 @@ export class TransitionPicker {
case to instanceof DFLeg:
return new DirectToFixTransition(from, to);
default:
if (DEBUG) {
if (LnavConfig.DEBUG_GEOMETRY) {
console.error(`Illegal sequence FMLeg -> ${to.constructor.name}`);
}
return null;
Expand Down Expand Up @@ -538,7 +539,7 @@ export class TransitionPicker {
return new CourseCaptureTransition(from, to);
}

if (DEBUG) {
if (LnavConfig.DEBUG_GEOMETRY) {
console.error(`Illegal sequence FDLEg -> ${to.constructor.name}`);
}

Expand All @@ -565,7 +566,7 @@ export class TransitionPicker {
case to instanceof DFLeg:
return new DirectToFixTransition(from, to);
default:
if (DEBUG) {
if (LnavConfig.DEBUG_GEOMETRY) {
console.error(`Illegal sequence FMLeg -> ${to.constructor.name}`);
}
return null;
Expand All @@ -592,7 +593,7 @@ export class TransitionPicker {
return null;
}

if (DEBUG) {
if (LnavConfig.DEBUG_GEOMETRY) {
console.error(`Illegal sequence VMLeg -> ${to.constructor.name}`);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class FixedRadiusTransition extends Transition {

recomputeWithParameters(isActive: boolean, tas: Knots, gs: Knots, ppos: Coordinates, trueTrack: DegreesTrue) {
if (this.isFrozen) {
if (DEBUG) {
if (LnavConfig.DEBUG_GEOMETRY) {
console.log('[FMS/Geometry] Not recomputing Type I transition as it is frozen.');
}
return;
Expand Down
Loading

0 comments on commit 4d54f0d

Please sign in to comment.