Use rome and initial format

This commit is contained in:
Sacha Weatherstone
2023-07-09 13:59:31 +10:00
parent a65bc37be5
commit 20ac657b51
90 changed files with 3350 additions and 3092 deletions
@@ -1,7 +1,7 @@
import type { PositionValidation } from "@app/validation/config/position.js";
import { DynamicForm } from "@components/Form/DynamicForm.js";
import { useDevice } from "@core/stores/deviceStore.js";
import { Protobuf } from "@meshtastic/meshtasticjs";
import { DynamicForm } from "@components/Form/DynamicForm.js";
export const Position = (): JSX.Element => {
const { config, nodes, hardware, setWorkingConfig } = useDevice();
@@ -11,9 +11,9 @@ export const Position = (): JSX.Element => {
new Protobuf.Config({
payloadVariant: {
case: "position",
value: data
}
})
value: data,
},
}),
);
};
@@ -31,20 +31,20 @@ export const Position = (): JSX.Element => {
name: "positionBroadcastSmartEnabled",
label: "Enable Smart Position",
description:
"Only send position when there has been a meaningful change in location"
"Only send position when there has been a meaningful change in location",
},
{
type: "toggle",
name: "fixedPosition",
label: "Fixed Position",
description:
"Don't report GPS position, but a manually-specified one"
"Don't report GPS position, but a manually-specified one",
},
{
type: "toggle",
name: "gpsEnabled",
label: "GPS Enabled",
description: "Enable the internal GPS module"
description: "Enable the internal GPS module",
},
{
type: "multiSelect",
@@ -52,22 +52,22 @@ export const Position = (): JSX.Element => {
label: "Position Flags",
description: "Configuration options for Position messages",
properties: {
enumValue: Protobuf.Config_PositionConfig_PositionFlags
}
enumValue: Protobuf.Config_PositionConfig_PositionFlags,
},
},
{
type: "number",
name: "rxGpio",
label: "Receive Pin",
description: "GPS Module RX pin override"
description: "GPS Module RX pin override",
},
{
type: "number",
name: "txGpio",
label: "Transmit Pin",
description: "GPS Module TX pin override"
}
]
description: "GPS Module TX pin override",
},
],
},
{
label: "Intervals",
@@ -77,22 +77,46 @@ export const Position = (): JSX.Element => {
type: "number",
name: "positionBroadcastSecs",
label: "Broadcast Interval",
description: "How often your position is sent out over the mesh"
description: "How often your position is sent out over the mesh",
},
{
type: "number",
name: "gpsUpdateInterval",
label: "GPS Update Interval",
description: "How often a GPS fix should be acquired"
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"
}
]
}
description: "How long the device will try to get a fix for",
},
{
type: "number",
name: "broadcastSmartMinimumDistance",
label: "Smart Position Minimum Distance",
description:
"Minimum distance (in meters) that must be traveled before a position update is sent",
disabledBy: [
{
fieldName: "positionBroadcastSmartEnabled",
},
],
},
{
type: "number",
name: "broadcastSmartMinimumIntervalSecs",
label: "Smart Position Minimum Interval",
description:
"Minimum interval (in seconds) that must pass before a position update is sent",
disabledBy: [
{
fieldName: "positionBroadcastSmartEnabled",
},
],
},
],
},
]}
/>
);