Merge pull request #252 from Hunter275/issue-251-mqtt-saving
Fix MQTT settings
This commit is contained in:
+2
-1
@@ -4,7 +4,8 @@
|
|||||||
"enabled": true
|
"enabled": true
|
||||||
},
|
},
|
||||||
"files": {
|
"files": {
|
||||||
"ignoreUnknown": true
|
"ignoreUnknown": true,
|
||||||
|
"ignore": ["vercel.json"]
|
||||||
},
|
},
|
||||||
"vcs": {
|
"vcs": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
|
|||||||
@@ -11,7 +11,13 @@ export const MQTT = (): JSX.Element => {
|
|||||||
new Protobuf.ModuleConfig.ModuleConfig({
|
new Protobuf.ModuleConfig.ModuleConfig({
|
||||||
payloadVariant: {
|
payloadVariant: {
|
||||||
case: "mqtt",
|
case: "mqtt",
|
||||||
value: data,
|
value: {
|
||||||
|
...data,
|
||||||
|
mapReportSettings:
|
||||||
|
new Protobuf.ModuleConfig.ModuleConfig_MapReportSettings(
|
||||||
|
data.mapReportSettings,
|
||||||
|
),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
import type { Message } from "@bufbuild/protobuf";
|
import type { Message } from "@bufbuild/protobuf";
|
||||||
import type { Protobuf } from "@meshtastic/js";
|
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
|
export class MqttValidation
|
||||||
implements
|
implements
|
||||||
@@ -47,8 +53,10 @@ export class MqttValidationMapReportSettings
|
|||||||
Omit<Protobuf.ModuleConfig.ModuleConfig_MapReportSettings, keyof Message>
|
Omit<Protobuf.ModuleConfig.ModuleConfig_MapReportSettings, keyof Message>
|
||||||
{
|
{
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
|
@IsOptional()
|
||||||
publishIntervalSecs: number;
|
publishIntervalSecs: number;
|
||||||
|
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
|
@IsOptional()
|
||||||
positionPrecision: number;
|
positionPrecision: number;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-5
@@ -1,5 +1 @@
|
|||||||
{
|
{ "github": { "silent": true } }
|
||||||
"github": {
|
|
||||||
"silent": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user