Skip to content

Commit

Permalink
Merge pull request #341 from justinlampley/AddTxBackpackPassthroughTa…
Browse files Browse the repository at this point in the history
…rgets

Add Passthrough flashing method and 2 new targets
  • Loading branch information
jurgelenas authored Jun 6, 2022
2 parents 7c59b0a + 2ea467c commit b6cc786
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 1 deletion.
3 changes: 3 additions & 0 deletions devices/diy-backpack.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"name": "DUPLEX TX Backpack",
"targets": [
{
"flashingMethod": "Passthrough",
"name": "DUPLETX_TX_Backpack_via_PASSTHRU"
},{
"flashingMethod": "UART",
"name": "DUPLETX_TX_Backpack_via_UART"
},
Expand Down
3 changes: 3 additions & 0 deletions devices/happymodel-backpack.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"name": "HappyModel TX Backpack",
"targets": [
{
"flashingMethod": "Passthrough",
"name": "HappyModel_TX_Backpack_via_PASSTHRU"
},{
"flashingMethod": "UART",
"name": "HappyModel_TX_Backpack_via_UART"
},
Expand Down
6 changes: 6 additions & 0 deletions graphql.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,12 @@
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "Passthrough",
"description": null,
"isDeprecated": false,
"deprecationReason": null
}
],
"possibleTypes": null
Expand Down
1 change: 1 addition & 0 deletions src/api/src/models/enum/FlashingMethod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ enum FlashingMethod {
WIFI = 'WIFI',
EdgeTxPassthrough = 'EdgeTxPassthrough',
Radio = 'Radio',
Passthrough = 'Passthrough',
}

registerEnumType(FlashingMethod, {
Expand Down
21 changes: 21 additions & 0 deletions src/ui/components/FlashingMethodDescription/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,27 @@ const FlashingMethodDescription: FunctionComponent<FlashingMethodDescriptionProp
</p>
</div>
);
case FlashingMethod.Passthrough:
return (
<div>
<p>
This method allows you to flash your module while it is connected
to your transmitter by using the passthrough feature.
</p>
<p>
<DocumentationLink
firmwareVersion={firmwareVersionData}
url={
wikiUrl ??
'https://www.expresslrs.org/{version}/quick-start/getting-started/'
}
>
Check the Wiki page for your particular device for more
information.
</DocumentationLink>
</p>
</div>
);
default:
return '';
}
Expand Down
1 change: 1 addition & 0 deletions src/ui/gql/generated/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export enum FlashingMethod {
WIFI = 'WIFI',
EdgeTxPassthrough = 'EdgeTxPassthrough',
Radio = 'Radio',
Passthrough = 'Passthrough',
}

export type UserDefine = {
Expand Down
4 changes: 3 additions & 1 deletion src/ui/views/ConfiguratorView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,9 @@ const ConfiguratorView: FunctionComponent<ConfiguratorViewProps> = (props) => {
if (
deviceTarget &&
(deviceTarget.flashingMethod === FlashingMethod.BetaflightPassthrough ||
deviceTarget.flashingMethod === FlashingMethod.UART)
deviceTarget.flashingMethod === FlashingMethod.UART ||
deviceTarget.flashingMethod === FlashingMethod.EdgeTxPassthrough ||
deviceTarget.flashingMethod === FlashingMethod.Passthrough)
) {
setSerialPortRequired(true);
} else {
Expand Down

0 comments on commit b6cc786

Please sign in to comment.