From 5dcd2a95c41ea5e3b7a5f8f7135ba711656844ea Mon Sep 17 00:00:00 2001 From: Daniel Kastl Date: Thu, 3 Oct 2024 18:21:36 +0900 Subject: [PATCH] Cleanup Signed-off-by: Daniel Kastl --- src/formHandler.ts | 7 +++---- src/protobufBuilder.ts | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/formHandler.ts b/src/formHandler.ts index c1a481d..12d06f7 100644 --- a/src/formHandler.ts +++ b/src/formHandler.ts @@ -1,5 +1,3 @@ -import { generateChannelId } from "./utils"; - /** * Get the values from the form using FormData API. */ @@ -10,7 +8,7 @@ export function getFormValues() { throw new Error('Form element not found.'); } - const formData = new FormData(form); // Pass the form to FormData + const formData = new FormData(form); // Extract form values and ensure the correct types const channelName = formData.get('channelName') as string; @@ -22,7 +20,8 @@ export function getFormValues() { const modemPreset = Number(formData.get('modemPreset')); const hopLimit = Number(formData.get('hopLimit')); - const uplinkEnabled = formData.get('uplinkEnabled') === 'on'; // Checkbox returns 'on' or undefined + // Checkboxes return 'on' or undefined + const uplinkEnabled = formData.get('uplinkEnabled') === 'on'; const downlinkEnabled = formData.get('downlinkEnabled') === 'on'; const positionPrecision = Number(formData.get('positionPrecision')); const isClientMuted = formData.get('isClientMuted') === 'on'; diff --git a/src/protobufBuilder.ts b/src/protobufBuilder.ts index 751bdd5..0735b05 100644 --- a/src/protobufBuilder.ts +++ b/src/protobufBuilder.ts @@ -52,8 +52,6 @@ export function buildProtobuf({ configOkToMqtt: configOkToMqtt || false, }); - console.log(configOkToMqtt, ignoreMqtt); - const moduleSettings = new Protobuf.Channel.ModuleSettings({ positionPrecision: positionPrecision || 0, isClientMuted: isClientMuted || false,