Skip to content

Commit

Permalink
Merge pull request #300 from Hunter275/primary-channel
Browse files Browse the repository at this point in the history
Only allow channel index 0 to be PRIMARY
  • Loading branch information
Hunter275 authored Sep 15, 2024
2 parents 921db10 + 2654e4f commit a6d1615
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/PageComponents/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,14 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => {
type: "select",
name: "role",
label: "Role",
disabled: channel.index === 0,
description:
"Device telemetry is sent over PRIMARY. Only one PRIMARY allowed",
properties: {
enumValue: Protobuf.Channel.Channel_Role,
enumValue:
channel.index === 0
? { PRIMARY: 1 }
: { DISABLED: 0, SECONDARY: 2 },
},
},
{
Expand Down

0 comments on commit a6d1615

Please sign in to comment.