Update protobufs

This commit is contained in:
Sacha Weatherstone
2022-09-09 21:02:16 +10:00
parent 47b34a8f27
commit 4e45990ef5
15 changed files with 123 additions and 143 deletions
+1 -4
View File
@@ -1,4 +1,4 @@
import { IsBoolean, IsEnum, Length } from "class-validator";
import { IsBoolean, IsEnum } from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs";
@@ -14,7 +14,4 @@ export class DeviceValidation implements Protobuf.Config_DeviceConfig {
@IsBoolean()
debugLogEnabled: boolean;
@Length(2, 30)
ntpServer: string;
}
+1 -1
View File
@@ -15,7 +15,7 @@ export class LoRaValidation implements Protobuf.Config_LoRaConfig {
bandwidth: number;
@IsInt()
@Min(7)
// @Min(7)
@Max(12)
spreadFactor: number;
+20
View File
@@ -0,0 +1,20 @@
import { IsBoolean, IsEnum, Length } from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs";
export class NetworkValidation implements Protobuf.Config_NetworkConfig {
@IsBoolean()
wifiEnabled: boolean;
@IsEnum(Protobuf.Config_NetworkConfig_WiFiMode)
wifiMode: Protobuf.Config_NetworkConfig_WiFiMode;
@Length(1, 33)
wifiSsid: string;
@Length(8, 64)
wifiPsk: string;
@Length(2, 30)
ntpServer: string;
}
+2 -5
View File
@@ -1,11 +1,8 @@
import { IsBoolean, IsEnum, IsInt, Max, Min } from "class-validator";
import { IsBoolean, IsInt, Max, Min } from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs";
import type { Protobuf } from "@meshtastic/meshtasticjs";
export class PowerValidation implements Protobuf.Config_PowerConfig {
@IsEnum(Protobuf.Config_PowerConfig_ChargeCurrent)
chargeCurrent: Protobuf.Config_PowerConfig_ChargeCurrent;
@IsBoolean()
isPowerSaving: boolean;
-17
View File
@@ -1,17 +0,0 @@
import { IsBoolean, IsEnum, Length } from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs";
export class WiFiValidation implements Protobuf.Config_WiFiConfig {
@IsBoolean()
enabled: boolean;
@IsEnum(Protobuf.Config_WiFiConfig_WiFiMode)
mode: Protobuf.Config_WiFiConfig_WiFiMode;
@Length(1, 33)
ssid: string;
@Length(8, 64)
psk: string;
}