-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
base: master
Are you sure you want to change the base?
Conversation
const temp = parseInt(tempString.replace('M', '-')); | ||
console.log('tS: ' + tempString); | ||
console.log('ti: ' + temp); | ||
let temp = parseInt(tempString); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) + '°'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return (temperature > 0 ? '+' : '') + temperature.toFixed(0) + '°'; | |
return `${temperature > 0 ? '+' : ''}${temperature.toFixed(0)}°`; |
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
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.