From 17c44054beecb5d5406dd9c12edb404c6205c704 Mon Sep 17 00:00:00 2001 From: Hunter Thornsberry Date: Mon, 17 Jun 2024 17:01:29 -0400 Subject: [PATCH 1/3] update MQTT precision dropdown and encryption warning --- .../PageComponents/ModuleConfig/MQTT.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/components/PageComponents/ModuleConfig/MQTT.tsx b/src/components/PageComponents/ModuleConfig/MQTT.tsx index dc75f4a9..7b491415 100644 --- a/src/components/PageComponents/ModuleConfig/MQTT.tsx +++ b/src/components/PageComponents/ModuleConfig/MQTT.tsx @@ -4,7 +4,7 @@ import { DynamicForm } from "@components/Form/DynamicForm.js"; import { Protobuf } from "@meshtastic/js"; export const MQTT = (): JSX.Element => { - const { moduleConfig, setWorkingModuleConfig } = useDevice(); + const { config, moduleConfig, setWorkingModuleConfig } = useDevice(); const onSubmit = (data: MqttValidation) => { setWorkingModuleConfig( @@ -70,7 +70,7 @@ export const MQTT = (): JSX.Element => { type: "toggle", name: "encryptionEnabled", label: "Encryption Enabled", - description: "Enable or disable MQTT encryption", + description: "Enable or disable MQTT encryption. Note: All messages are sent to the MQTT broker unencrypted if this option is not enabled, even when your uplink channels have encryption keys set. This includes position data.", disabledBy: [ { fieldName: "enabled", @@ -151,10 +151,16 @@ export const MQTT = (): JSX.Element => { ], }, { - type: "number", + type: "select", name: "mapReportSettings.positionPrecision", - label: "Position Precision", - description: "Precision of the position", + label: "Approximate Location", + description: + "If not sharing precise location, position shared on channel will be accurate within this distance", + properties: { + enumValue: config.display?.units == 0 ? + { "Within 23 km":10, "Within 12 km":11, "Within 5.8 km":12, "Within 2.9 km":13, "Within 1.5 km":14, "Within 700 m":15, "Within 350 m":16, "Within 200 m":17, "Within 90 m":18, "Within 50 m":19 } : + { "Within 15 miles":10, "Within 7.3 miles":11, "Within 3.6 miles":12, "Within 1.8 miles":13, "Within 0.9 miles":14, "Within 0.5 miles":15, "Within 0.2 miles":16, "Within 600 feet":17, "Within 300 feet":18, "Within 150 feet":19 } + }, disabledBy: [ { fieldName: "enabled", From 4c1737bc441d4fbddd446e364b33147d54dfa9fb Mon Sep 17 00:00:00 2001 From: Hunter Thornsberry Date: Tue, 18 Jun 2024 14:18:55 -0400 Subject: [PATCH 2/3] remove precise location mention as there is a setting for that --- src/components/PageComponents/ModuleConfig/MQTT.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/PageComponents/ModuleConfig/MQTT.tsx b/src/components/PageComponents/ModuleConfig/MQTT.tsx index 7b491415..7058f2d0 100644 --- a/src/components/PageComponents/ModuleConfig/MQTT.tsx +++ b/src/components/PageComponents/ModuleConfig/MQTT.tsx @@ -155,7 +155,7 @@ export const MQTT = (): JSX.Element => { name: "mapReportSettings.positionPrecision", label: "Approximate Location", description: - "If not sharing precise location, position shared on channel will be accurate within this distance", + "Position shared on channel will be accurate within this distance", properties: { enumValue: config.display?.units == 0 ? { "Within 23 km":10, "Within 12 km":11, "Within 5.8 km":12, "Within 2.9 km":13, "Within 1.5 km":14, "Within 700 m":15, "Within 350 m":16, "Within 200 m":17, "Within 90 m":18, "Within 50 m":19 } : From 4143249c55cdecd0a88fca95f8808a0907027f77 Mon Sep 17 00:00:00 2001 From: Hunter Thornsberry Date: Tue, 18 Jun 2024 14:19:29 -0400 Subject: [PATCH 3/3] remove mention of channel --- src/components/PageComponents/ModuleConfig/MQTT.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/PageComponents/ModuleConfig/MQTT.tsx b/src/components/PageComponents/ModuleConfig/MQTT.tsx index 7058f2d0..9653a2cb 100644 --- a/src/components/PageComponents/ModuleConfig/MQTT.tsx +++ b/src/components/PageComponents/ModuleConfig/MQTT.tsx @@ -155,7 +155,7 @@ export const MQTT = (): JSX.Element => { name: "mapReportSettings.positionPrecision", label: "Approximate Location", description: - "Position shared on channel will be accurate within this distance", + "Position shared will be accurate within this distance", properties: { enumValue: config.display?.units == 0 ? { "Within 23 km":10, "Within 12 km":11, "Within 5.8 km":12, "Within 2.9 km":13, "Within 1.5 km":14, "Within 700 m":15, "Within 350 m":16, "Within 200 m":17, "Within 90 m":18, "Within 50 m":19 } :