Skip to content

Commit

Permalink
Hide selftest/boot screens for SD React part (ATC mailbox takes over)
Browse files Browse the repository at this point in the history
  • Loading branch information
flogross89 committed Nov 11, 2024
1 parent e80f3f5 commit d66baa3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const DisplayUnitToPotentiometer: { [k in DisplayUnitID]: number } = {
interface DisplayUnitProps {
displayUnitId: DisplayUnitID;
failed?: boolean;
hideBootTestScreens?: boolean;
}

enum DisplayUnitState {
Expand All @@ -63,7 +64,7 @@ function BacklightBleed(props) {
}

export const LegacyCdsDisplayUnit = forwardRef<SVGSVGElement, PropsWithChildren<DisplayUnitProps>>(
({ displayUnitId, failed, children }, ref) => {
({ displayUnitId, failed, hideBootTestScreens, children }, ref) => {
const [coldDark] = useSimVar('L:A32NX_COLD_AND_DARK_SPAWN' /* TODO 380 simvar */, 'Bool', 200);
const [state, setState] = useState(coldDark ? DisplayUnitState.Off : DisplayUnitState.Standby);
const [timer, setTimer] = useState<number | null>(null);
Expand Down Expand Up @@ -167,7 +168,7 @@ export const LegacyCdsDisplayUnit = forwardRef<SVGSVGElement, PropsWithChildren<
);
}

if (state === DisplayUnitState.ThalesBootup) {
if (state === DisplayUnitState.ThalesBootup && !hideBootTestScreens) {
return (
<>
<BacklightBleed homeCockpit={homeCockpit} />
Expand All @@ -181,7 +182,7 @@ export const LegacyCdsDisplayUnit = forwardRef<SVGSVGElement, PropsWithChildren<
);
}

if (state === DisplayUnitState.Selftest) {
if (state === DisplayUnitState.Selftest && !hideBootTestScreens) {
return (
<>
<BacklightBleed homeCockpit={homeCockpit} />
Expand Down
2 changes: 1 addition & 1 deletion fbw-a380x/src/systems/instruments/src/SD/SystemDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ export const SystemDisplay = () => {
};

return (
<LegacyCdsDisplayUnit displayUnitId={DisplayUnitID.Sd}>
<LegacyCdsDisplayUnit displayUnitId={DisplayUnitID.Sd} hideBootTestScreens={true}>
<g>
{PAGES[currentPage]}
<StatusArea />
Expand Down

0 comments on commit d66baa3

Please sign in to comment.