From 3d3a08a23fe11325cafb6a74573eda543b662311 Mon Sep 17 00:00:00 2001 From: Hunter Thornsberry Date: Tue, 17 Sep 2024 13:47:07 -0400 Subject: [PATCH 1/2] replace with select --- .../PageComponents/Config/Position.tsx | 33 +++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/src/components/PageComponents/Config/Position.tsx b/src/components/PageComponents/Config/Position.tsx index e8a93c31..ed369d96 100644 --- a/src/components/PageComponents/Config/Position.tsx +++ b/src/components/PageComponents/Config/Position.tsx @@ -78,10 +78,39 @@ export const Position = (): JSX.Element => { description: "GPS module enable pin override", }, { - type: "number", + type: "select", name: "channelPrecision", label: "Channel Precision", - description: "GPS channel precision", + description: + "GPS channel precision", + 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, + }, + }, }, ], }, From 0e92dd9bea5f16c12b860b012220efd8cbf5e357 Mon Sep 17 00:00:00 2001 From: Hunter Thornsberry Date: Tue, 17 Sep 2024 13:53:36 -0400 Subject: [PATCH 2/2] There is no longer a setting here --- .../PageComponents/Config/Position.tsx | 35 ------------------- src/validation/config/position.ts | 3 -- 2 files changed, 38 deletions(-) diff --git a/src/components/PageComponents/Config/Position.tsx b/src/components/PageComponents/Config/Position.tsx index ed369d96..531750e9 100644 --- a/src/components/PageComponents/Config/Position.tsx +++ b/src/components/PageComponents/Config/Position.tsx @@ -77,41 +77,6 @@ export const Position = (): JSX.Element => { label: "Enable Pin", description: "GPS module enable pin override", }, - { - type: "select", - name: "channelPrecision", - label: "Channel Precision", - description: - "GPS channel precision", - 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, - }, - }, - }, ], }, { diff --git a/src/validation/config/position.ts b/src/validation/config/position.ts index b02f095d..7eb42c56 100644 --- a/src/validation/config/position.ts +++ b/src/validation/config/position.ts @@ -43,7 +43,4 @@ export class PositionValidation @IsEnum(Protobuf.Config.Config_PositionConfig_GpsMode) gpsMode: Protobuf.Config.Config_PositionConfig_GpsMode; - - @IsArray() - channelPrecision: number[]; }