update deps & mqtt config
This commit is contained in:
@@ -122,6 +122,45 @@ export const MQTT = (): JSX.Element => {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "toggle",
|
||||
name: "mapReportingEnabled",
|
||||
label: "Map Reporting Enabled",
|
||||
description: "Enable or disable map reporting",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
name: "mapReportSettings.publishIntervalSecs",
|
||||
label: "Map Report Publish Interval (s)",
|
||||
description: "Interval in seconds to publish map reports",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled",
|
||||
},
|
||||
{
|
||||
fieldName: "mapReportingEnabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
name: "mapReportSettings.positionPrecision",
|
||||
label: "Position Precision",
|
||||
description: "Precision of the position",
|
||||
disabledBy: [
|
||||
{
|
||||
fieldName: "enabled",
|
||||
},
|
||||
{
|
||||
fieldName: "mapReportingEnabled",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]}
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
import type { Protobuf } from "@meshtastic/js";
|
||||
import { IsBoolean, IsString, Length } from "class-validator";
|
||||
import { IsBoolean, IsString, Length, IsNumber } from "class-validator";
|
||||
|
||||
export class MqttValidation
|
||||
implements Omit<Protobuf.ModuleConfig.ModuleConfig_MQTTConfig, keyof Message>
|
||||
implements
|
||||
Omit<
|
||||
Protobuf.ModuleConfig.ModuleConfig_MQTTConfig,
|
||||
keyof Message | "mapReportSettings"
|
||||
>
|
||||
{
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
@@ -31,4 +35,20 @@ export class MqttValidation
|
||||
|
||||
@IsBoolean()
|
||||
proxyToClientEnabled: boolean;
|
||||
|
||||
@IsBoolean()
|
||||
mapReportingEnabled: boolean;
|
||||
|
||||
mapReportSettings: MqttValidationMapReportSettings;
|
||||
}
|
||||
|
||||
export class MqttValidationMapReportSettings
|
||||
implements
|
||||
Omit<Protobuf.ModuleConfig.ModuleConfig_MapReportSettings, keyof Message>
|
||||
{
|
||||
@IsNumber()
|
||||
publishIntervalSecs: number;
|
||||
|
||||
@IsNumber()
|
||||
positionPrecision: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user