diff --git a/src/components/tools/FrequencyCalculator.tsx b/src/components/tools/FrequencyCalculator.tsx index aeb53e7a..d5465234 100644 --- a/src/components/tools/FrequencyCalculator.tsx +++ b/src/components/tools/FrequencyCalculator.tsx @@ -1,5 +1,6 @@ +import { Config_LoRaConfig_ModemPreset } from "@buf/meshtastic_protobufs.bufbuild_es/meshtastic/config_pb"; import { Protobuf, Types } from "@meshtastic/js"; -import React, { useEffect } from "react"; +import React, { useEffect, useState } from "react"; interface Region { freqStart: number; @@ -273,18 +274,18 @@ const modemPresets = new Map< export const FrequencyCalculator = (): JSX.Element => { const [modemPreset, setModemPreset] = - React.useState( + useState( Protobuf.Config.Config_LoRaConfig_ModemPreset.LONG_FAST, ); const [region, setRegion] = - React.useState( + useState( Protobuf.Config.Config_LoRaConfig_RegionCode.US, ); - const [channel, setChannel] = React.useState( - Types.ChannelNumber.PRIMARY, + const [channel, setChannel] = useState( + Types.ChannelNumber.Primary, ); - const [numChannels, setNumChannels] = React.useState(0); - const [channelFrequency, setChannelFrequency] = React.useState(0); + const [numChannels, setNumChannels] = useState(0); + const [channelFrequency, setChannelFrequency] = useState(0); useEffect(() => { const selectedRegion = RegionData.get(region); @@ -344,6 +345,12 @@ export const FrequencyCalculator = (): JSX.Element => { ))} + +
+ + +
+
-
- - -