diff --git a/biome.json b/biome.json index c0f18797..6d2c7f6c 100644 --- a/biome.json +++ b/biome.json @@ -4,7 +4,8 @@ "enabled": true }, "files": { - "ignoreUnknown": true + "ignoreUnknown": true, + "ignore": ["vercel.json"] }, "vcs": { "enabled": true, diff --git a/src/components/PageComponents/ModuleConfig/MQTT.tsx b/src/components/PageComponents/ModuleConfig/MQTT.tsx index 45793b2c..1dc324bb 100644 --- a/src/components/PageComponents/ModuleConfig/MQTT.tsx +++ b/src/components/PageComponents/ModuleConfig/MQTT.tsx @@ -11,7 +11,13 @@ export const MQTT = (): JSX.Element => { new Protobuf.ModuleConfig.ModuleConfig({ payloadVariant: { case: "mqtt", - value: data, + value: { + ...data, + mapReportSettings: + new Protobuf.ModuleConfig.ModuleConfig_MapReportSettings( + data.mapReportSettings, + ), + }, }, }), ); diff --git a/src/validation/moduleConfig/mqtt.ts b/src/validation/moduleConfig/mqtt.ts index 4a3550b4..7a2c9170 100644 --- a/src/validation/moduleConfig/mqtt.ts +++ b/src/validation/moduleConfig/mqtt.ts @@ -1,6 +1,12 @@ import type { Message } from "@bufbuild/protobuf"; import type { Protobuf } from "@meshtastic/js"; -import { IsBoolean, IsNumber, IsString, Length } from "class-validator"; +import { + IsBoolean, + IsNumber, + IsOptional, + IsString, + Length, +} from "class-validator"; export class MqttValidation implements @@ -47,8 +53,10 @@ export class MqttValidationMapReportSettings Omit { @IsNumber() + @IsOptional() publishIntervalSecs: number; @IsNumber() + @IsOptional() positionPrecision: number; } diff --git a/vercel.json b/vercel.json index 7ae9a3de..29bf418c 100644 --- a/vercel.json +++ b/vercel.json @@ -1,5 +1 @@ -{ - "github": { - "silent": true - } -} +{ "github": { "silent": true } }