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(fma): continuation of presel text fix #8328

Merged
merged 7 commits into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
1. [HOPPIE] Remove ATSU/AOC source checks - @auroraisluna (alepouna)
1. [PFD] Graphical improvements and updates to the FMA - @BravoMike99 (bruno_pt99)
1. [PFD] Hide '+' sign on V/S & FPA FMA if selected value is 0 - @BravoMike99 (bruno_pt99)
1. [PFD] Improve FMA preselect speed & mach text @aaronschweig(aaronschweig) @BravoMike99 (bruno_pt99)

## 0.11.0

Expand Down
Binary file not shown.
54 changes: 41 additions & 13 deletions fbw-a32nx/src/fonts/ECAMFontRegular_Source.sfd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ OS2Version: 4
OS2_WeightWidthSlopeOnly: 0
OS2_UseTypoMetrics: 1
CreationTime: 1630565342
ModificationTime: 1685715111
ModificationTime: 1701114684
PfmFamily: 17
TTFWeight: 400
TTFWidth: 5
Expand Down Expand Up @@ -428,7 +428,7 @@ LayerCount: 2
Fore
SplineSet
1267 2253 m 2,0,1
1267 1729 l 1,2,-1
1267 2253 1267 2253 1267 1729 c 1,2,-1
1638 2100 l 2,3,4
1679 2141 1679 2141 1737.5 2141 c 128,-1,5
1796 2141 1796 2141 1837.5 2099.5 c 128,-1,6
Expand Down Expand Up @@ -489,7 +489,7 @@ LayerCount: 2
Fore
SplineSet
1070 2091 m 2,0,1
1070 1564 l 1,2,-1
1070 2091 1070 2091 1070 1564 c 1,2,-1
1597 1564 l 2,3,4
1656 1564 1656 1564 1697 1523 c 128,-1,5
1738 1482 1738 1482 1738 1423 c 128,-1,6
Expand Down Expand Up @@ -1186,7 +1186,7 @@ SplineSet
1739 1147 l 1,2,-1
1127 2605 l 1,0,-1
1890 129 m 2,3,4
1823 865 l 1,5,-1
1890 129 1890 129 1823 865 c 1,5,-1
431 865 l 1,6,-1
364 129 l 2,7,8
359 71 359 71 314 33.5 c 128,-1,9
Expand Down Expand Up @@ -1360,7 +1360,7 @@ SplineSet
1391 284 1391 284 1573 515 c 0,24,25
1667 633 1667 633 1718 815.5 c 128,-1,26
1769 998 1769 998 1769 1243 c 2,27,28
1769 1871 l 2,29,30
1769 1243 1769 1243 1769 1871 c 2,29,30
1769 2115 1769 2115 1718 2297.5 c 128,-1,31
1667 2480 1667 2480 1573 2599 c 0,32,33
1391 2830 1391 2830 1046 2830 c 2,34,-1
Expand Down Expand Up @@ -1450,7 +1450,7 @@ LayerCount: 2
Fore
SplineSet
284 2095 m 6,0,1
284 1142 l 6,2,3
284 2095 284 2095 284 1142 c 6,2,3
284 1072 284 1072 286 1016 c 4,4,5
287 976 287 976 297 883 c 4,6,7
305 805 305 805 325 731 c 132,-1,8
Expand Down Expand Up @@ -1901,7 +1901,7 @@ SplineSet
804 344 804 344 902 314 c 128,-1,14
1000 284 1000 284 1109 284 c 0,15,16
1370 284 1370 284 1554 448 c 1,17,18
1088 906 l 2,19,20
1554 448 1554 448 1088 906 c 2,19,20
1046 947 1046 947 1045.5 1005.5 c 128,-1,21
1045 1064 1045 1064 1086 1106 c 128,-1,22
1127 1148 1127 1148 1186 1148.5 c 128,-1,23
Expand Down Expand Up @@ -2203,7 +2203,7 @@ LayerCount: 2
Fore
SplineSet
2130 2964 m 2,0,1
1973 141 l 2,2,3
2130 2964 2130 2964 1973 141 c 2,2,3
1972 104 1972 104 1954 72 c 128,-1,4
1936 40 1936 40 1903 21 c 0,5,6
1864 -2 1864 -2 1820 2 c 0,7,8
Expand Down Expand Up @@ -2307,7 +2307,7 @@ SplineSet
2052 3029 2052 3029 2052 2971 c 2,12,-1
2052 2669 l 2,13,14
2052 2609 2052 2609 2016 2561 c 2,15,16
1227 1509 l 1,17,-1
2016 2561 2016 2561 1227 1509 c 1,17,-1
1227 142 l 2,18,19
1227 83 1227 83 1185.5 42 c 128,-1,20
1144 1 1144 1 1085.5 1 c 128,-1,21
Expand Down Expand Up @@ -2936,12 +2936,12 @@ EndChar
StartChar: greater
Encoding: 62 62 96
Width: 2568
Flags: WO
Flags: W
LayerCount: 2
Fore
SplineSet
315 2829 m 6,0,1
1787 1667 l 6,2,3
315 2829 315 2829 1787 1667 c 6,2,3
1795 1661 1795 1661 1802 1654 c 4,4,5
1819 1637 1819 1637 1829 1615 c 4,6,7
1843 1585 1843 1585 1843 1555 c 4,8,9
Expand Down Expand Up @@ -3291,10 +3291,38 @@ EndChar
StartChar: bar
Encoding: 124 124 130
Width: 2568
Flags: W
VWidth: 3780
Flags: WO
LayerCount: 2
Fore
Validated: 1
SplineSet
473 1728 m 2,0,1
473 1793 473 1793 519.5 1839 c 128,-1,2
566 1885 566 1885 631 1885 c 2,3,-1
945 1885 l 2,4,5
1010 1885 1010 1885 1056 1839 c 128,-1,6
1102 1793 1102 1793 1102 1728 c 2,7,-1
1102 1414 l 2,8,9
1102 1349 1102 1349 1056 1303 c 128,-1,10
1010 1257 1010 1257 945 1257 c 2,11,-1
631 1257 l 2,12,13
566 1257 566 1257 519.5 1303 c 128,-1,14
473 1349 473 1349 473 1414 c 2,15,-1
473 1728 l 2,0,1
473 471 m 2,16,17
473 536 473 536 519.5 582 c 128,-1,18
566 628 566 628 631 628 c 2,19,-1
945 628 l 2,20,21
1010 628 1010 628 1056 582 c 128,-1,22
1102 536 1102 536 1102 471 c 2,23,-1
1102 157 l 2,24,25
1102 92 1102 92 1056 46 c 128,-1,26
1010 0 1010 0 945 0 c 2,27,-1
631 0 l 2,28,29
566 0 566 0 519.5 46 c 128,-1,30
473 92 473 92 473 157 c 2,31,-1
473 471 l 2,16,17
EndSplineSet
EndChar

StartChar: braceright
Expand Down
23 changes: 20 additions & 3 deletions fbw-a32nx/src/systems/instruments/src/PFD/FMA.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -630,18 +630,31 @@ class AB3Cell extends DisplayComponent<CellProps> {

private textSub = Subject.create('');

private text2Sub = Subject.create('');

private textXPosSub= Subject.create(0);
BravoMike99 marked this conversation as resolved.
Show resolved Hide resolved

private getText() {
if (this.athrModeMessage === 0) {
/* use vertical bar instead of : for PRESEL text since : is not aligned to the bottom as the other fonts and the font file is used on ECAM, ND etc.
vertical bar is mapped to ":" aligned to bottom in font file
*/
if (this.speedPreselVal !== -1 && this.machPreselVal === -1) {
const text = Math.round(this.speedPreselVal);
this.textSub.set(`SPEED SEL ${text}`);
this.textSub.set('SPEED SEL| ');
this.text2Sub.set(`${text}`);
this.textXPosSub.set(35.434673);
} else if (this.machPreselVal !== -1 && this.speedPreselVal === -1) {
this.textSub.set(`MACH SEL ${this.machPreselVal.toFixed(2)}`);
this.textSub.set('MACH SEL| ');
this.text2Sub.set(`${this.machPreselVal.toFixed(2)}`);
this.textXPosSub.set(33.834673);
} else if (this.machPreselVal === -1 && this.speedPreselVal === -1) {
this.textSub.set('');
this.text2Sub.set('');
}
} else {
this.textSub.set('');
this.text2Sub.set('');
}
}

Expand All @@ -668,7 +681,11 @@ class AB3Cell extends DisplayComponent<CellProps> {

render(): VNode {
return (
<text class="FontMedium MiddleAlign Cyan" x="35.434673" y="21.656223">{this.textSub}</text>
<g>
<text class="FontMedium MiddleAlign Cyan" style="white-space: pre" x={this.textXPosSub} y="21.656223">{this.textSub}</text>
<text class="FontMedium MiddleAlign Cyan" x="52.934673" y="21.656223">{this.text2Sub}</text>
</g>

);
}
}
Expand Down
Loading