-
-
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
fix(a380x/sd): Correct SD - EL/DC APU TR text color #9797
base: master
Are you sure you want to change the base?
Conversation
Thank for making me aware that there is a bug in the electrical configuration code. Battery 2 should not be connected whithout having AC power available. Will be fixed with #9803. |
@@ -67,7 +67,7 @@ export const TransformerRectifier: FC<TransformerRectifierProps> = ({ x, y, bus | |||
<text | |||
x={57} | |||
y={22} | |||
className={`F25 MiddleAlign ${trVoltageNormal && trCurrentNormal ? 'White' : 'Amber'} LS1 WS-8`} | |||
className={`F25 MiddleAlign ${trVoltageNormal && (trCurrentNormal || title === 'APU TR') ? 'White' : 'Amber'} LS1 WS-8`} |
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.
Instead of comparing the title maybe it would be better to check the bus? Or set a variable at line 26 which indicates to ignore the current abnormality?
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.
Thank you. I will check the bus.
<text | ||
x={65} | ||
y={97} | ||
className={`F28 EndAlign ${trCurrentNormal ? 'Green' : title === 'APU TR' ? 'White' : 'Amber'} LS1`} |
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.
I strongly doubt that this should actually be white. The image provided in the reference issue is not really conclusive when looking at, and using a color picker tool, there is clear green in the area surrounding the letter
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.
Ok, I just confirmed with another reference that I cannot show here, that the indication is indeed green, not white, as I suspected.
Thank you. So in normal configuration, APU TR current in green for all ranges. Moreover, do you know what the color will be when APU TR fails (in the first screenshot)? |
Not entirely sure, but what I can tell you is that on ground, with all batteries on, but no AC power, the title will be white, not amber. |
@@ -67,7 +67,7 @@ export const TransformerRectifier: FC<TransformerRectifierProps> = ({ x, y, bus | |||
<text | |||
x={57} | |||
y={22} | |||
className={`F25 MiddleAlign ${trVoltageNormal && trCurrentNormal ? 'White' : 'Amber'} LS1 WS-8`} | |||
className={`F25 MiddleAlign ${(trVoltageNormal && trCurrentNormal) || bus == DcElecBus.DcApu ? 'White' : 'Amber'} LS1 WS-8`} |
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.
I think the code would be clearer if the condition was added to the trVoltageNormal
/trCurrentNormal
variables directly instead of here
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.
Definitely!
I updated the logic to be outside of css classes ternary operator. Should I request re-review everytime? |
const trVoltageNormal = potential > TR_VOLTAGE_NORMAL_RANGE_LOWER && potential < TR_VOLTAGE_NORMAL_RANGE_UPPER; | ||
const trNormal = bus == DcElecBus.DcApu || (trCurrentNormal && trVoltageNormal); |
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.
This seems to be redundant with skipCurrentCeck
?
Fixes #[9760]
Summary of Changes
For APU TR, the title color is white when
trVoltageNormal == True
. For other TRs, they are white whentrVoltageNormal && trCurrentNormal
.For APU TR amps text, it is in green when
trCurrentNormal == True
, in white whentrCurrentNormal == False
.Other TRs amps text color are in amber when
trCurrentNormal == False
.Screenshots (if necessary)
Updated as of commit 792368e
Only BAT1, BAT2, ESS BAT is AUTO, no idea why TR2 is powered and has a 28V potential (didn't modify any potential reading).
AC1, 2 powered
Normal configuration, where APU TR and amps text are in white.
)
APU Start on APU TR
References
Refer to Issue
Additional context
Now, there's no negativity checking on APU TR amps, I think it's not possible for a TR to have negative current going out anyway.
I might've missed some correct behaviours, it would be great if someone could add more references.
Discord username (if different from GitHub): pzb-85
Testing instructions
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.