Skip to content

Commit

Permalink
Only allow channel index 0 to be PRIMARY
Browse files Browse the repository at this point in the history
  • Loading branch information
Hunter275 committed Sep 15, 2024
1 parent 921db10 commit 3b018b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/PageComponents/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ 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 3b018b0

Please sign in to comment.