Minor fixes
This commit is contained in:
+6
-6
@@ -22,9 +22,9 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@arcgis/core": "^4.24.7",
|
"@arcgis/core": "^4.24.7",
|
||||||
"@emeraldpay/hashicon-react": "^0.5.2",
|
"@emeraldpay/hashicon-react": "^0.5.2",
|
||||||
"@hookform/resolvers": "^2.9.6",
|
"@hookform/resolvers": "^2.9.7",
|
||||||
"@meshtastic/eslint-config": "^1.0.8",
|
"@meshtastic/eslint-config": "^1.0.8",
|
||||||
"@meshtastic/meshtasticjs": "^0.6.81",
|
"@meshtastic/meshtasticjs": "^0.6.83",
|
||||||
"base64-js": "^1.5.1",
|
"base64-js": "^1.5.1",
|
||||||
"class-transformer": "^0.5.1",
|
"class-transformer": "^0.5.1",
|
||||||
"class-validator": "^0.13.2",
|
"class-validator": "^0.13.2",
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-hook-form": "^7.33.1",
|
"react-hook-form": "^7.34.0",
|
||||||
"react-icons": "^4.4.0",
|
"react-icons": "^4.4.0",
|
||||||
"react-json-pretty": "^2.2.0",
|
"react-json-pretty": "^2.2.0",
|
||||||
"react-qrcode-logo": "^2.7.0",
|
"react-qrcode-logo": "^2.7.0",
|
||||||
@@ -43,12 +43,12 @@
|
|||||||
"snarkdown": "^2.0.0",
|
"snarkdown": "^2.0.0",
|
||||||
"swr": "^1.3.0",
|
"swr": "^1.3.0",
|
||||||
"vite-plugin-environment": "^1.1.2",
|
"vite-plugin-environment": "^1.1.2",
|
||||||
"zustand": "4.0.0-rc.4"
|
"zustand": "4.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/chrome": "^0.0.193",
|
"@types/chrome": "^0.0.193",
|
||||||
"@types/geodesy": "^2.2.3",
|
"@types/geodesy": "^2.2.3",
|
||||||
"@types/node": "^18.0.6",
|
"@types/node": "^18.6.3",
|
||||||
"@types/react": "^18.0.15",
|
"@types/react": "^18.0.15",
|
||||||
"@types/react-dom": "^18.0.6",
|
"@types/react-dom": "^18.0.6",
|
||||||
"@types/w3c-web-serial": "^1.0.2",
|
"@types/w3c-web-serial": "^1.0.2",
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
"tslib": "^2.4.0",
|
"tslib": "^2.4.0",
|
||||||
"typescript": "^4.7.4",
|
"typescript": "^4.7.4",
|
||||||
"unimported": "^1.21.0",
|
"unimported": "^1.21.0",
|
||||||
"vite": "^3.0.2",
|
"vite": "^3.0.4",
|
||||||
"vite-plugin-cdn-import": "^0.3.5"
|
"vite-plugin-cdn-import": "^0.3.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+316
-187
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,13 @@
|
|||||||
import type React from "react";
|
import type React from "react";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
import { FormField, SelectField, Switch, TextInputField } from "evergreen-ui";
|
import { FormField, Switch, TextInputField } from "evergreen-ui";
|
||||||
import { Controller, useForm } from "react-hook-form";
|
import { Controller, useForm } from "react-hook-form";
|
||||||
|
|
||||||
import { TelemetryValidation } from "@app/validation/moduleConfig/telemetry.js";
|
import { TelemetryValidation } from "@app/validation/moduleConfig/telemetry.js";
|
||||||
import { Form } from "@components/form/Form";
|
import { Form } from "@components/form/Form";
|
||||||
import { useDevice } from "@core/stores/deviceStore.js";
|
import { useDevice } from "@core/stores/deviceStore.js";
|
||||||
import { renderOptions } from "@core/utils/selectEnumOptions.js";
|
|
||||||
import { classValidatorResolver } from "@hookform/resolvers/class-validator";
|
import { classValidatorResolver } from "@hookform/resolvers/class-validator";
|
||||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
|
||||||
|
|
||||||
export const Telemetry = (): JSX.Element => {
|
export const Telemetry = (): JSX.Element => {
|
||||||
const { moduleConfig, connection } = useDevice();
|
const { moduleConfig, connection } = useDevice();
|
||||||
@@ -75,14 +73,6 @@ export const Telemetry = (): JSX.Element => {
|
|||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</FormField>
|
</FormField>
|
||||||
<TextInputField
|
|
||||||
label="Read Error Count Threshold"
|
|
||||||
description="Max transmit power in dBm"
|
|
||||||
type="number"
|
|
||||||
{...register("environmentReadErrorCountThreshold", {
|
|
||||||
valueAsNumber: true,
|
|
||||||
})}
|
|
||||||
/>
|
|
||||||
<TextInputField
|
<TextInputField
|
||||||
label="Update Interval"
|
label="Update Interval"
|
||||||
description="Max transmit power in dBm"
|
description="Max transmit power in dBm"
|
||||||
@@ -92,15 +82,6 @@ export const Telemetry = (): JSX.Element => {
|
|||||||
valueAsNumber: true,
|
valueAsNumber: true,
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
<TextInputField
|
|
||||||
label="Recovery Interval"
|
|
||||||
description="Max transmit power in dBm"
|
|
||||||
hint="Seconds"
|
|
||||||
type="number"
|
|
||||||
{...register("environmentRecoveryInterval", {
|
|
||||||
valueAsNumber: true,
|
|
||||||
})}
|
|
||||||
/>
|
|
||||||
<FormField
|
<FormField
|
||||||
label="Display Farenheit"
|
label="Display Farenheit"
|
||||||
description="Description"
|
description="Description"
|
||||||
@@ -115,21 +96,6 @@ export const Telemetry = (): JSX.Element => {
|
|||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</FormField>
|
</FormField>
|
||||||
<SelectField
|
|
||||||
label="Sensor Type"
|
|
||||||
description="This is a description."
|
|
||||||
{...register("environmentSensorType", { valueAsNumber: true })}
|
|
||||||
>
|
|
||||||
{renderOptions(Protobuf.TelemetrySensorType)}
|
|
||||||
</SelectField>
|
|
||||||
<TextInputField
|
|
||||||
label="Sensor Pin"
|
|
||||||
description="Max transmit power in dBm"
|
|
||||||
type="number"
|
|
||||||
{...register("environmentSensorPin", {
|
|
||||||
valueAsNumber: true,
|
|
||||||
})}
|
|
||||||
/>
|
|
||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,12 +1,26 @@
|
|||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
|
|
||||||
import { majorScale, Pane, Spinner, StatusIndicator } from "evergreen-ui";
|
import {
|
||||||
|
Button,
|
||||||
|
majorScale,
|
||||||
|
Pane,
|
||||||
|
ResetIcon,
|
||||||
|
Spinner,
|
||||||
|
StatusIndicator,
|
||||||
|
} from "evergreen-ui";
|
||||||
|
|
||||||
import { useDevice } from "@app/core/stores/deviceStore.js";
|
import { useDevice } from "@app/core/stores/deviceStore.js";
|
||||||
|
|
||||||
export const Progress = (): JSX.Element => {
|
export const Progress = (): JSX.Element => {
|
||||||
const { hardware, channels, config, moduleConfig, setReady, nodes } =
|
const {
|
||||||
useDevice();
|
hardware,
|
||||||
|
channels,
|
||||||
|
config,
|
||||||
|
moduleConfig,
|
||||||
|
setReady,
|
||||||
|
nodes,
|
||||||
|
connection,
|
||||||
|
} = useDevice();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (
|
if (
|
||||||
@@ -80,6 +94,14 @@ export const Progress = (): JSX.Element => {
|
|||||||
{hardware.myNodeNum !== 0 &&
|
{hardware.myNodeNum !== 0 &&
|
||||||
`(${channels.length} / ${hardware.maxChannels})`}
|
`(${channels.length} / ${hardware.maxChannels})`}
|
||||||
</StatusIndicator>
|
</StatusIndicator>
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
void connection?.configure();
|
||||||
|
}}
|
||||||
|
iconBefore={ResetIcon}
|
||||||
|
>
|
||||||
|
Retry
|
||||||
|
</Button>
|
||||||
</Pane>
|
</Pane>
|
||||||
</Pane>
|
</Pane>
|
||||||
</Pane>
|
</Pane>
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ export const Header = (): JSX.Element => {
|
|||||||
{getDevices().length !== 0 && (
|
{getDevices().length !== 0 && (
|
||||||
<Tooltip content="Disconnect active device">
|
<Tooltip content="Disconnect active device">
|
||||||
<Button
|
<Button
|
||||||
iconAfter={CrossIcon}
|
iconBefore={CrossIcon}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
removeDevice(selectedDevice ?? 0);
|
removeDevice(selectedDevice ?? 0);
|
||||||
}}
|
}}
|
||||||
@@ -133,7 +133,9 @@ export const Header = (): JSX.Element => {
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
href="https://github.com/meshtastic/meshtastic-web"
|
href="https://github.com/meshtastic/meshtastic-web"
|
||||||
>
|
>
|
||||||
<IconButton icon={FiGithub} />
|
<Button iconBefore={FiGithub}>
|
||||||
|
{import.meta.env.COMMIT_HASH ?? "DEVELOPMENT"}
|
||||||
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip content="Visit Meshtastic.org">
|
<Tooltip content="Visit Meshtastic.org">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { IsBoolean, IsEnum, IsInt } from "class-validator";
|
import { IsBoolean, IsInt } from "class-validator";
|
||||||
|
|
||||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
import type { Protobuf } from "@meshtastic/meshtasticjs";
|
||||||
|
|
||||||
export class TelemetryValidation
|
export class TelemetryValidation
|
||||||
implements Protobuf.ModuleConfig_TelemetryConfig
|
implements Protobuf.ModuleConfig_TelemetryConfig
|
||||||
@@ -17,18 +17,6 @@ export class TelemetryValidation
|
|||||||
@IsBoolean()
|
@IsBoolean()
|
||||||
environmentScreenEnabled: boolean;
|
environmentScreenEnabled: boolean;
|
||||||
|
|
||||||
@IsInt()
|
|
||||||
environmentReadErrorCountThreshold: number;
|
|
||||||
|
|
||||||
@IsInt()
|
|
||||||
environmentRecoveryInterval: number;
|
|
||||||
|
|
||||||
@IsBoolean()
|
@IsBoolean()
|
||||||
environmentDisplayFahrenheit: boolean;
|
environmentDisplayFahrenheit: boolean;
|
||||||
|
|
||||||
@IsEnum(Protobuf.TelemetrySensorType)
|
|
||||||
environmentSensorType: Protobuf.TelemetrySensorType;
|
|
||||||
|
|
||||||
@IsInt()
|
|
||||||
environmentSensorPin: number;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user