import React from 'react'; import { Disclosure } from '@headlessui/react'; import { ChevronDownIcon, ChevronRightIcon } from '@heroicons/react/outline'; import { Protobuf } from '@meshtastic/meshtasticjs'; export interface ChannelProps { channel: Protobuf.Channel; } const Channel = (props: ChannelProps): JSX.Element => { return ( {({ open }) => ( <>
{open ? ( ) : ( )} {props.channel.index} -{' '} {Protobuf.Channel_Role[props.channel.role]}

Bandwidth:

{props.channel.settings?.bandwidth}

Channel Number:

{props.channel.settings?.channelNum}

Coding Rate:

{props.channel.settings?.codingRate}

ID:

{props.channel.settings?.id}

Modem Config:

{props.channel.settings?.modemConfig ? Protobuf.ChannelSettings_ModemConfig[ props.channel.settings.modemConfig ] : null}

Name:

{props.channel.settings?.name}

PSK:

{props.channel.settings?.psk.toLocaleString()}

Spread Factor:

{props.channel.settings?.spreadFactor}

Tx Power:

{props.channel.settings?.txPower}

Uplink:

{props.channel.settings?.uplinkEnabled ? 'true' : 'false'}

Downlink:

{props.channel.settings?.downlinkEnabled ? 'true' : 'false'}
)}
); }; export default Channel;