Browse Source

move GPS mode, update description, and remove deprecated settings.

pull/187/head
rcarteraz 2 years ago
committed by Sacha Weatherstone
parent
commit
7d1768a1d3
  1. 31
      src/components/PageComponents/Config/Position.tsx
  2. 6
      src/validation/config/position.ts

31
src/components/PageComponents/Config/Position.tsx

@ -33,6 +33,16 @@ export const Position = (): JSX.Element => {
description:
"Only send position when there has been a meaningful change in location",
},
{
type: "select",
name: "gpsMode",
label: "GPS Mode",
description:
"Configure whether device GPS is Enabled, Disabled, or Not Present",
properties: {
enumValue: Protobuf.Config.Config_PositionConfig_GpsMode,
},
},
{
type: "toggle",
name: "fixedPosition",
@ -40,12 +50,6 @@ export const Position = (): JSX.Element => {
description:
"Don't report GPS position, but a manually-specified one",
},
{
type: "toggle",
name: "gpsEnabled",
label: "GPS Enabled",
description: "Enable the internal GPS module",
},
{
type: "multiSelect",
name: "positionFlags",
@ -73,15 +77,6 @@ export const Position = (): JSX.Element => {
label: "Enable Pin",
description: "GPS module enable pin override",
},
{
type: "select",
name: "gpsMode",
label: "GPS Mode",
description: "GPS module mode",
properties: {
enumValue: Protobuf.Config.Config_PositionConfig_GpsMode,
},
},
{
type: "number",
name: "channelPrecision",
@ -106,12 +101,6 @@ export const Position = (): JSX.Element => {
label: "GPS Update Interval",
description: "How often a GPS fix should be acquired",
},
{
type: "number",
name: "gpsAttemptTime",
label: "Fix Attempt Duration",
description: "How long the device will try to get a fix for",
},
{
type: "number",
name: "broadcastSmartMinimumDistance",

6
src/validation/config/position.ts

@ -14,15 +14,9 @@ export class PositionValidation
@IsBoolean()
fixedPosition: boolean;
@IsBoolean()
gpsEnabled: boolean;
@IsInt()
gpsUpdateInterval: number;
@IsInt()
gpsAttemptTime: number;
@IsInt()
positionFlags: number;

Loading…
Cancel
Save