Skip to content

Commit 97989f7

Browse files
committed
fix: weather uplink loads origin, prefer zfw
1 parent 785e014 commit 97989f7

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

src/instruments/src/EFB/apps/Aircraft/FuelPayload.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,13 @@ export const FuelPayload: FC = () => {
8181
};
8282

8383
const load = () => {
84-
plannedPax && setPax(plannedPax);
85-
plannedCargo && setCargo(metric ? plannedCargo * 2.205 : plannedCargo);
86-
plannedZfw && setZfw(metric ? plannedZfw * 2.205 : plannedZfw);
84+
if (!plannedZfw) {
85+
plannedPax && setPax(plannedPax);
86+
plannedCargo && setCargo(metric ? plannedCargo * 2.205 : plannedCargo);
87+
} else {
88+
setZfw(metric ? plannedZfw * 2.205 : plannedZfw);
89+
}
90+
8791
plannedFuel && setFuel(metric ? plannedFuel * 2.205 : plannedFuel);
8892
};
8993

src/instruments/src/EFB/apps/FZPro/TopBar.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export const TopBar: FC<TopBarProps> = ({ setFlightDisplayed, flightDisplayed, v
3232
</TopBarSection>
3333
<TopBarSection>
3434
<Icons>
35-
<MdSatelliteAlt size={35} fill="white" />
3635
<IoMdSettings size={40} onClick={() => navigate("/settings/general")} />
3736
</Icons>
3837
</TopBarSection>

src/instruments/src/EFB/apps/Settings/components/Toggle.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import styled from "styled-components";
33

44
import { ListItem } from "../../../components/ListItem";
55

6-
type ToggleProps = { label: string; enabled: boolean; onClick: (enabled: boolean) => void };
6+
type ToggleProps = { label: string; enabled: boolean; onClick: (enabled: boolean) => void; gray?: boolean };
77

8-
export const Toggle: FC<ToggleProps> = ({ label, enabled, onClick }) => (
9-
<ListItem noMouseDownEffect>
8+
export const Toggle: FC<ToggleProps> = ({ label, enabled, onClick, gray = false }) => (
9+
<ListItem noMouseDownEffect gray={gray}>
1010
<div className="side">{label}</div>
1111
<StyledToggle className="side" enabled={enabled} onClick={() => onClick(enabled)}>
1212
<StyledToggleCircle enabled={enabled} />

src/instruments/src/EFB/apps/Weather/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const Weather: FC = () => {
5656
try {
5757
const newOfp = await SimbriefClient.getOfp(await SimbriefClient.getSimbriefUserIDFromUsername(simbriefUsername as string));
5858
setOfp(newOfp);
59-
handleSelectAirport(newOfp.destination.icao_code);
59+
handleSelectAirport(newOfp.origin.icao_code);
6060
} catch (_) {
6161
setModal(<InfoModal title="Error" description="Failed to fetch SimBrief OFP" />);
6262
}

0 commit comments

Comments
 (0)