Skip to content

Commit

Permalink
Merge pull request #274 from ExpressLRS/betafpv-old-branch-warning
Browse files Browse the repository at this point in the history
Display warning for users if they are trying to flash BetaFPV custom fork
  • Loading branch information
jurgelenas authored Feb 11, 2022
2 parents 7833176 + 1cc7491 commit eceea48
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/ui/components/FirmwareVersionForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ const styles = {
firmwareVersionAlert: {
marginTop: 2,
},
betaFpvAlert: {
marginTop: 2,
marginBottom: 1,
},
};

interface FirmwareVersionCardProps {
Expand Down Expand Up @@ -388,6 +392,8 @@ const FirmwareVersionForm: FunctionComponent<FirmwareVersionCardProps> = (
}));
}, [gitPullRequests]);

const showBetaFpvAlert =
localPath?.toLocaleLowerCase()?.indexOf('betafpv') > -1;
return (
<>
<Tabs
Expand Down Expand Up @@ -506,6 +512,16 @@ const FirmwareVersionForm: FunctionComponent<FirmwareVersionCardProps> = (
onChange={onLocalPath}
/>

{showBetaFpvAlert && (
<Alert severity="error" sx={styles.betaFpvAlert}>
<AlertTitle>ATTENTION</AlertTitle>
You are trying to flash an outdated BetaFPV custom ExpressLRS
fork. BetaFPV hardware is fully supported in recent official
ExpressLRS releases. We recommend using official firmware to
have the best ExpressLRS experience.
</Alert>
)}

<Button
color="secondary"
size="small"
Expand Down

0 comments on commit eceea48

Please sign in to comment.