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(a380x/oans): EXIT missed, flags/crosses, visual fixes #9725

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 17 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
2 changes: 2 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@
1. [A380X/MFD] Fixed the altitude prediction not rounding to the nearest 10 on the FPLN page - @bulenteroglu (senolitam)
1. [A380X/MFD] Use slashed zero as default font for FMS pages - @bulenteroglu (senolitam)
1. [A380X/ND] Remove leading zeros from terrain elevation display - @BravoMike99 (bruno_pt99)
1. [A380X/BTV] Add EXIT MISSED indication on FMA and aural triple click - @flogross89 (floridude)
1. [A380X/OANS] Add flags/crosses capability, change cursor to magenta, implement ARPT NAV reset button - @flogross89 (floridude)
1. [A32NX/FWS] Fix autopilot instinctive disconnect button logic for 3D model - @flogross89 (floridude)
1. [A380X/EFIS] Fix VV pb indicator not turning on when TRK-FPA mode is selected - @heclak (Heclak)
1. [FMS] Transition altitude/level and RNP now come from navdata in MSFS2024 - @tracernz (Mike)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4982,6 +4982,9 @@
</Component>

<Component ID="Overhead_Reset_Panel">
<UseTemplate Name="FBW_Airbus_RESET_PANEL_BUTTON">
<NAME>ARPT_NAV</NAME>
</UseTemplate>
<UseTemplate Name="FBW_Airbus_RESET_PANEL_BUTTON">
<NAME>FMC_A</NAME>
</UseTemplate>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,35 @@ import {
FSComponent,
Subject,
Subscribable,
SubscribableUtils,
Subscription,
VNode,
} from '@microsoft/msfs-sdk';
import './style.scss';

export enum MouseCursorColor {
YELLOW,
MAGENTA,
}

interface MouseCursorProps extends ComponentProps {
side: Subscribable<'CAPT' | 'FO'>;
isDoubleScreenMfd?: boolean;
visible?: Subject<boolean>;
color?: Subscribable<MouseCursorColor> | MouseCursorColor;
}

export class MouseCursor extends DisplayComponent<MouseCursorProps> {
private subs: Subscription[] = [];

private readonly divRef = FSComponent.createRef<HTMLSpanElement>();

private readonly fillColor = '#ffff00'; // or ff94ff = purple, but not sure where that is used
private readonly color: Subscribable<MouseCursorColor> = SubscribableUtils.toSubscribable(
this.props.color ?? MouseCursorColor.YELLOW,
true,
);

private readonly fillColor = this.color.map((c) => (c === MouseCursorColor.MAGENTA ? '#ff94ff' : '#ffff00'));

private hideTimer: ReturnType<typeof setTimeout> | undefined = undefined;

Expand Down Expand Up @@ -65,10 +77,10 @@ export class MouseCursor extends DisplayComponent<MouseCursorProps> {
<div ref={this.divRef} class="mfd-mouse-cursor">
<svg width="80" height="80" xmlns="http://www.w3.org/2000/svg">
<g transform={this.props.side.map((side) => `rotate(${side === 'FO' ? 90 : 0} 40 40)`)}>
<polyline points="0,0 40,35 80,0" style={`fill: none; stroke: ${this.fillColor}; stroke-width: 3`} />
<line x1="40" y1="39" x2="40" y2="41" style={`stroke: ${this.fillColor}; stroke-width: 2`} />
<line x1="39" y1="40" x2="41" y2="40" style={`stroke: ${this.fillColor}; stroke-width: 2`} />
<polyline points="0,80 40,45 80,80" style={`fill: none; stroke: ${this.fillColor}; stroke-width: 3`} />
<polyline points="0,0 40,35 80,0" style={{ fill: 'none', stroke: this.fillColor, 'stroke-width': '3' }} />
<line x1="40" y1="39" x2="40" y2="41" style={{ stroke: this.fillColor, 'stroke-width': '2' }} />
<line x1="39" y1="40" x2="41" y2="40" style={{ stroke: this.fillColor, 'stroke-width': '2' }} />
<polyline points="0,80 40,45 80,80" style={{ fill: 'none', stroke: this.fillColor, 'stroke-width': '3' }} />
</g>
</svg>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ import { EventBus, SimVarDefinition, SimVarValueType, SimVarPublisher } from '@m
* Functionally, these behave similarly to circuit breakers, however they only interrupt software. If pulled out, execution of SW is halted.
*/
export type ResetPanelSimvars = {
a380x_reset_panel_arpt_nav: boolean;
a380x_reset_panel_fmc_a: boolean;
a380x_reset_panel_fmc_b: boolean;
a380x_reset_panel_fmc_c: boolean;
};

export class ResetPanelSimvarPublisher extends SimVarPublisher<ResetPanelSimvars> {
private static simvars = new Map<keyof ResetPanelSimvars, SimVarDefinition>([
['a380x_reset_panel_arpt_nav', { name: 'L:A32NX_RESET_PANEL_ARPT_NAV', type: SimVarValueType.Bool }],
['a380x_reset_panel_fmc_a', { name: 'L:A32NX_RESET_PANEL_FMC_A', type: SimVarValueType.Bool }],
['a380x_reset_panel_fmc_b', { name: 'L:A32NX_RESET_PANEL_FMC_B', type: SimVarValueType.Bool }],
['a380x_reset_panel_fmc_c', { name: 'L:A32NX_RESET_PANEL_FMC_C', type: SimVarValueType.Bool }],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

import { DisplayComponent, FSComponent, Subscribable, VNode } from '@microsoft/msfs-sdk';
import './oans-style.scss';
import { EntityTypes } from './OansControlPanel';
import { ControlPanelMapDataSearchMode } from '@flybywiresim/oanc';

interface OansRunwayInfoBoxProps {
rwyOrStand: Subscribable<EntityTypes | null>;
rwyOrStand: Subscribable<ControlPanelMapDataSearchMode | null>;
selectedEntity: Subscribable<string | null>;
tora: Subscribable<string | null>;
lda: Subscribable<string | null>;
Expand All @@ -22,10 +22,10 @@ export class OansRunwayInfoBox extends DisplayComponent<OansRunwayInfoBoxProps>
this.rwyDivRef.instance.style.display = 'none';
this.standDivRef.instance.style.display = 'none';

if (this.props.rwyOrStand.get() === EntityTypes.RWY && this.props.selectedEntity.get()) {
if (this.props.rwyOrStand.get() === ControlPanelMapDataSearchMode.RWY && this.props.selectedEntity.get()) {
this.rwyDivRef.instance.style.display = 'grid';
this.standDivRef.instance.style.display = 'none';
} else if (this.props.rwyOrStand.get() === EntityTypes.STAND && this.props.selectedEntity.get()) {
} else if (this.props.rwyOrStand.get() === ControlPanelMapDataSearchMode.STAND && this.props.selectedEntity.get()) {
this.rwyDivRef.instance.style.display = 'none';
this.standDivRef.instance.style.display = 'flex';
} else {
Expand Down
Loading
Loading