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(atsu): Coupled atsu and DATALINK STATUS page #7656

Merged
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
3059dbf
Linked EFB SATCOM Option to DATALINK STATUS Page
StenAfMARS Dec 13, 2022
074add9
Small changes, to make the code more readable
StenAfMARS Dec 13, 2022
baca545
updated Changelog.
StenAfMARS Dec 14, 2022
2474d95
Changes:
StenAfMARS Dec 14, 2022
315daa6
Merge branch 'master' into Feature/ATC_COMM_#7641
StenAfMARS Dec 14, 2022
b8e3f1b
Added datalink status code
StenAfMARS Dec 17, 2022
61abced
Split Datalink Status codes into status codes and Mode codes for clar…
StenAfMARS Dec 18, 2022
9b8c140
Merge branch 'master' into Feature/DATALINK_STATUS_Page_ATSU_Prep
StenAfMARS Dec 18, 2022
287dde7
updated values for DATALINK status and MODE
StenAfMARS Dec 18, 2022
8deb470
Added functions to atsu to update DATALINK STATUS and MODE.
StenAfMARS Dec 18, 2022
727cd26
Updated DATALINK STATUS page to take advantage of new atsu functions.
StenAfMARS Dec 18, 2022
a3591e6
small clean-up of unused code.
StenAfMARS Dec 18, 2022
d37a1fe
Code clean up.
StenAfMARS Dec 18, 2022
f17e38c
Code clean up.
StenAfMARS Dec 18, 2022
6ed41e0
Merge branch 'Feature/DATALINK_STATUS_Page_ATSU_Prep' of https://gith…
StenAfMARS Dec 18, 2022
394f600
fixed lint error.
StenAfMARS Dec 18, 2022
08a00a8
Changed enum values from string to int.
StenAfMARS Dec 19, 2022
16f833f
moved functions to Datalink.ts
StenAfMARS Dec 19, 2022
325ad87
moved functions to Datalink.ts
StenAfMARS Dec 19, 2022
c6e05a9
Merge branch 'Feature/DATALINK_STATUS_Page_ATSU_Prep' of https://gith…
StenAfMARS Dec 19, 2022
a46bcba
Merge branch 'master' into Feature/DATALINK_STATUS_Page_ATSU_Prep
StenAfMARS Dec 19, 2022
ba7632d
Merge branch 'master' into Feature/DATALINK_STATUS_Page_ATSU_Prep
StenAfMARS Dec 19, 2022
d08f4d4
no message
StenAfMARS Dec 19, 2022
584c506
Merge branch 'master' into Feature/DATALINK_STATUS_Page_ATSU_Prep
StenAfMARS Dec 19, 2022
c01482a
Merge branch 'flybywiresim:master' into Feature/DATALINK_STATUS_Page_…
StenAfMARS Dec 20, 2022
34fd2ea
Merge branch 'master' into Feature/DATALINK_STATUS_Page_ATSU_Prep
StenAfMARS Dec 20, 2022
d9cdfe2
Merge branch 'master' into Feature/DATALINK_STATUS_Page_ATSU_Prep
StenAfMARS Dec 21, 2022
8796e22
Merge branch 'master' into Feature/DATALINK_STATUS_Page_ATSU_Prep
svengcz Dec 21, 2022
f41c87b
Merge branch 'master' into Feature/DATALINK_STATUS_Page_ATSU_Prep
svengcz Dec 22, 2022
9ec6214
Merge branch 'flybywiresim:master' into Feature/DATALINK_STATUS_Page_…
StenAfMARS Dec 26, 2022
372fd4a
Merge branch 'flybywiresim:master' into Feature/DATALINK_STATUS_Page_…
StenAfMARS Dec 27, 2022
5415267
Code refactoring for better performance and readability.
StenAfMARS Dec 27, 2022
5f5b856
Added check for availability of satcom.
StenAfMARS Dec 27, 2022
7aac1b8
Merge branch 'Feature/DATALINK_STATUS_page_Refactor' into Feature/DAT…
StenAfMARS Dec 27, 2022
c9a9869
Merge branch 'flybywiresim:master' into Feature/DATALINK_STATUS_Page_…
StenAfMARS Dec 28, 2022
bd7875a
fixed spacing on the printout from the DATALINK STATUS page.
StenAfMARS Dec 28, 2022
5ac0d18
Merge branch 'Feature/DATALINK_STATUS_Page_ATSU_Prep' of https://gith…
StenAfMARS Dec 28, 2022
a77729b
Merge branch 'master' into Feature/DATALINK_STATUS_Page_ATSU_Prep
StenAfMARS Dec 29, 2022
637d63b
Merge branch 'master' into Feature/DATALINK_STATUS_Page_ATSU_Prep
svengcz Dec 29, 2022
1cd482d
Merge branch 'master' into Feature/DATALINK_STATUS_Page_ATSU_Prep
StenAfMARS Jan 5, 2023
f471b8c
Merge branch 'master' into Feature/DATALINK_STATUS_Page_ATSU_Prep
StenAfMARS Jan 9, 2023
9e7a65e
Merge branch 'master' into Feature/DATALINK_STATUS_Page_ATSU_Prep
svengcz Jan 11, 2023
cd0e984
Merge branch 'master' into Feature/DATALINK_STATUS_Page_ATSU_Prep
Saschl Jan 11, 2023
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 @@ -11,6 +11,7 @@
1. [FMGC] Show proper transition names and final approach slope from AAU1 - @tracernz (Mike)
1. [FMGC] Don't accept blank input or / for hold distance - @tracernz (Mike)
1. [ATSU] Fix LSK6L not returning to ATSU DATALINK page in ATC MENU - @BravoMike99 (Bruno_pt99#5802)
1. [ATSU] Linked EFB SatCom option to DATALINK STATUS page - @StenAfMARS (space_viking#0186)

## 0.9.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,14 @@ class CDUAtsuDatalinkStatus {
};
SimVar.SetSimVarValue("L:FMC_UPDATE_CURRENT_PAGE", "number", 1);

let vhf3Mode = "AOC ONLY";
if (SimVar.GetSimVarValue("L:A32NX_HOPPIE_ACTIVE", "number") === 1) {
vhf3Mode = "ATC/AOC";
}

mcdu.setTemplate([
["DATALINK STATUS"],
[""],
["VHF3 : {green}DLK AVAIL{end}"],
[`\xa0\xa0\xa0\xa0\xa0\xa0\xa0${vhf3Mode}`],
["SATCOM : {small}NOT INSTALLED{end}"],
[""],
["HF : {small}NOT INSTALLED{end}"],
[`VHF3 : ${mcdu.atsu.vhfDatalinkStatus()}`],
[`\xa0\xa0\xa0\xa0\xa0\xa0\xa0${mcdu.atsu.vhfDatalinkMode()}`],
[`SATCOM : ${mcdu.atsu.satcomDatalinkStatus()}`],
[`\xa0\xa0\xa0\xa0\xa0\xa0\xa0${mcdu.atsu.satcomDatalinkMode()}`],
[`HF : ${mcdu.atsu.hfDatalinkStatus()}`],
[""],
[""],
[""],
Expand Down
33 changes: 33 additions & 0 deletions src/atsu/src/ATSU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// SPDX-License-Identifier: GPL-3.0

import { FmgcFlightPhase } from '@shared/flightphase';
import { DatalinkModeCode, DatalinkStatusCode } from '@atsu/DatalinkStatusCodes';
import { CpdlcMessage } from './messages/CpdlcMessage';
import { Datalink } from './com/Datalink';
import { AtsuStatusCodes } from './AtsuStatusCodes';
Expand Down Expand Up @@ -319,4 +320,36 @@ export class Atsu {
public targetFlightState() {
return this.flightStateObserver.FcuSettings;
}

public vhfDatalinkStatus() {
StenAfMARS marked this conversation as resolved.
Show resolved Hide resolved
return DatalinkStatusCode.DlkAvail;
}

public vhfDatalinkMode() {
let mode = DatalinkModeCode.None;

if (SimVar.GetSimVarValue('L:A32NX_HOPPIE_ACTIVE', 'number') === 1) {
mode = DatalinkModeCode.AtcAoc;
} else {
mode = DatalinkModeCode.Aoc;
}

return mode;
}

public satcomDatalinkStatus() {
return DatalinkStatusCode.DlkNotAvail;
}

public satcomDatalinkMode() {
return DatalinkModeCode.None;
}

public hfDatalinkStatus() {
return DatalinkStatusCode.NotInstalled;
}

public hfDatalinkMode() {
return DatalinkModeCode.None;
}
}
17 changes: 17 additions & 0 deletions src/atsu/src/DatalinkStatusCodes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) 2022 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0

export enum DatalinkStatusCode {
DlkAvail = '{green}DLK AVAIL{end}',
DlkNotAvail = '{small}DLK NOT AVAIL{end}',
Inop = '{red}INOP{end}',
NotInstalled = '{small}NOT INSTALLED{end}'

}

export enum DatalinkModeCode {
StenAfMARS marked this conversation as resolved.
Show resolved Hide resolved
AtcAoc = 'ATC/AOC',
Aoc = 'AOC',
Atc = 'ATC',
None = ''
}