From c3c36c5762bfb6efc4382244d74a7e165380878c Mon Sep 17 00:00:00 2001 From: Hunter Thornsberry Date: Sat, 15 Jun 2024 12:03:43 -0400 Subject: [PATCH 1/2] Distance is set in km not meters not --- src/components/PageComponents/Channel.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/PageComponents/Channel.tsx b/src/components/PageComponents/Channel.tsx index bcacac06..69bdba33 100644 --- a/src/components/PageComponents/Channel.tsx +++ b/src/components/PageComponents/Channel.tsx @@ -112,8 +112,8 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { "If not sharing precise location, position shared on channel will be accurate within this distance", properties: { enumValue: config.display?.units == 0 ? - { "Within 23 km":23000, "Within 12 km":12000, "Within 5.8 km":5800, "Within 2.9 km":2900, "Within 1.5 km":1500, "Within 700 m":700, "Within 350 m":350, "Within 200 m":200, "Within 90 m":90, "Within 50 m":50 } : - { "Within 15 miles":24140, "Within 7.3 miles":11748, "Within 3.6 miles":5793, "Within 1.8 miles":2896, "Within 0.9 miles":1448, "Within 0.5 miles":804, "Within 0.2 miles":321, "Within 600 feet":182, "Within 300 feet":91, "Within 150 feet":45 } + { "Within 23 km":23, "Within 12 km":12, "Within 5.8 km":5.8, "Within 2.9 km":2.9, "Within 1.5 km":1.5, "Within 700 m":0.7, "Within 350 m":0.35, "Within 200 m":0.2, "Within 90 m":0.09, "Within 50 m":0.05 } : + { "Within 15 miles":24.140, "Within 7.3 miles":11.748, "Within 3.6 miles":5.793, "Within 1.8 miles":2.896, "Within 0.9 miles":1.448, "Within 0.5 miles":0.804, "Within 0.2 miles":0.321, "Within 600 feet":0.182, "Within 300 feet":0.091, "Within 150 feet":0.045 } }, }, ], From ae0e41621949465b44d90531ba20a1d5ec14a306 Mon Sep 17 00:00:00 2001 From: Hunter Thornsberry Date: Sat, 15 Jun 2024 14:38:55 -0400 Subject: [PATCH 2/2] correctly map distance values --- src/components/PageComponents/Channel.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/PageComponents/Channel.tsx b/src/components/PageComponents/Channel.tsx index 69bdba33..fded45b1 100644 --- a/src/components/PageComponents/Channel.tsx +++ b/src/components/PageComponents/Channel.tsx @@ -45,7 +45,7 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { psk: fromByteArray(channel?.settings?.psk ?? new Uint8Array(0)), positionEnabled: channel?.settings?.moduleSettings?.positionPrecision != undefined && channel?.settings?.moduleSettings?.positionPrecision > 0, preciseLocation: channel?.settings?.moduleSettings?.positionPrecision == 32, - positionPrecision: channel?.settings?.moduleSettings?.positionPrecision == undefined ? config.display?.units == 0 ? 23000 : 24140 : channel?.settings?.moduleSettings?.positionPrecision + positionPrecision: channel?.settings?.moduleSettings?.positionPrecision == undefined ? 10 : channel?.settings?.moduleSettings?.positionPrecision }, }, }} @@ -112,8 +112,8 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => { "If not sharing precise location, position shared on channel will be accurate within this distance", properties: { enumValue: config.display?.units == 0 ? - { "Within 23 km":23, "Within 12 km":12, "Within 5.8 km":5.8, "Within 2.9 km":2.9, "Within 1.5 km":1.5, "Within 700 m":0.7, "Within 350 m":0.35, "Within 200 m":0.2, "Within 90 m":0.09, "Within 50 m":0.05 } : - { "Within 15 miles":24.140, "Within 7.3 miles":11.748, "Within 3.6 miles":5.793, "Within 1.8 miles":2.896, "Within 0.9 miles":1.448, "Within 0.5 miles":0.804, "Within 0.2 miles":0.321, "Within 600 feet":0.182, "Within 300 feet":0.091, "Within 150 feet":0.045 } + { "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 } }, }, ],