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(a32nx/mcdu): H4 ground & cruise temperature sign improvement #9827

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

BravoMike99
Copy link
Contributor

Fixes #[issue_no]

Summary of Changes

Continuing the H4 PR train, changes temperature display on the INIT page of the GND TEMP & CRZ TEMP fields to show a sign if the value is not zero.
Cruise temperature entry assumes a negative value if no sign is entered.

Screenshots (if necessary)

References

image

Additional context

Discord username (if different from GitHub):
bruno_pt99

Testing instructions

Open the init page of the MCDU.
Verify GND TEMP value shows a positive sign if the value is positive.
Enter a negative value, verify negative sign is shown.
Enter a value of 0, verify no sign is shown.
On the CRZ FL/TEMP prompt, enter the temperature value without a sign and ensure it defaults to negative (note: flight level needs to be inserted prior to only accept temperature entries, otherwise, FL/temp is required).
Insert a positive value and verify a positive sign is shown.
Insert a value of 0 and verify no sign is shown.
Insert a negative value with the - sign and verify it is inserted correctly.

How to download the PR for QA

Every new commit to this PR will cause new A32NX and A380X artifacts to be created, built, and uploaded.

  1. Make sure you are signed in to GitHub
  2. Click on the Checks tab on the PR
  3. On the left side, find and click on the PR Build tab
  4. Click on either flybywire-aircraft-a320-neo, flybywire-aircraft-a380-842 (4K) or flybywire-aircraft-a380-842 (8K) download link at the bottom of the page

@BravoMike99 BravoMike99 added the A32NX Related to the A32NX aircraft label Feb 4, 2025
const temp = parseInt(tempString.replace('M', '-'));
console.log('tS: ' + tempString);
console.log('ti: ' + temp);
let temp = parseInt(tempString);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intended that you can no longer type in a negative value in the format of "M03" for example?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. No manual mentions the M thing and it is oddly specific to this field hence why I removed it.

@@ -785,4 +789,8 @@ export class CDUInitPage {
static formatWindComponent(tailwindComponent) {
return Math.round(Math.abs(tailwindComponent)).toFixed(0).padStart(3, '0');
}

static formatTemperature(temperature: number): string {
return (temperature > 0 ? '+' : '') + temperature.toFixed(0) + '°';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return (temperature > 0 ? '+' : '') + temperature.toFixed(0) + '°';
return `${temperature > 0 ? '+' : ''}${temperature.toFixed(0)}°`;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A32NX Related to the A32NX aircraft
Projects
Status: 🟡 Code Review: Ready for Review
Development

Successfully merging this pull request may close these issues.

3 participants