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

fix(a380x): EWD & PFD visual fixes #9581

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -497,10 +497,12 @@ export class GaugeThrustComponent extends DisplayComponent<GaugeThrustComponentP
y: this.props.y + valueMaxDir.y * this.props.radius,
};

const diffAngle = valueMaxDir.angle - valueIdleDir.angle;

return [
`M ${this.props.x},${this.props.y} L ${valueIdleEnd.x},${valueIdleEnd.y}`,
`A ${this.props.radius} ${this.props.radius} 0 ${this.props.reverse ? '0' : '1'} 1 ${valueMaxEnd.x} ${valueMaxEnd.y}`,
`M ${valueMaxEnd.x} ${valueMaxEnd.y} L ${this.props.x},${this.props.y}`,
`M ${this.props.x},${this.props.y} L ${valueIdleEnd.x.toFixed(2)},${valueIdleEnd.y.toFixed(2)}`,
`A ${this.props.radius} ${this.props.radius} 0 ${Math.abs(diffAngle) < 180 || this.props.reverse ? '0' : '1'} 1 ${valueMaxEnd.x.toFixed(2)} ${valueMaxEnd.y.toFixed(2)}`,
`M ${valueMaxEnd.x.toFixed(2)} ${valueMaxEnd.y.toFixed(2)} L ${this.props.x},${this.props.y}`,
].join(' ');
},
this.valueIdleSub,
Expand Down
7 changes: 6 additions & 1 deletion fbw-a380x/src/systems/instruments/src/PFD/LowerArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,8 @@ class RudderTrimIndicator extends DisplayComponent<{ bus: ArincEventBus }> {
w.bitValueOr(28, false),
);

private readonly fwcFlightPhase = ConsumerSubject.create(this.sub.on('fwcFlightPhase'), 0);

private readonly speed = Arinc429ConsumerSubject.create(this.sub.on('speedAr'));

private readonly engine1Running = ConsumerSubject.create(this.sub.on('engOneRunning'), true);
Expand Down Expand Up @@ -595,16 +597,19 @@ class RudderTrimIndicator extends DisplayComponent<{ bus: ArincEventBus }> {
const rt = this.rudderTrimOrder.get();

const inFlightOrGroundFaster60Exceeds1Deg = (!gnd || (gnd && cas.valueOr(0) > 60)) && Math.abs(rt) > 1;
const onGroundSlower60Exceeds0p3 = gnd && cas.valueOr(0) < 60 && Math.abs(rt) > 0.3;
const onGroundSlower60Exceeds0p3 = gnd && cas.valueOr(61) < 60 && Math.abs(rt) > 0.3;

if (
this.fwcFlightPhase.get() >= 2 &&
!gnd &&
(!this.engine1Running.get() ||
!this.engine2Running.get() ||
!this.engine3Running.get() ||
!this.engine4Running.get())
) {
this.engineHasFailed = true;
} else if (this.engineHasFailed && this.fwcFlightPhase.get() < 2) {
this.engineHasFailed = false;
}

const visCondition =
Expand Down