Update protobufs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ export class LoRaValidation implements Protobuf.Config_LoRaConfig {
|
||||
bandwidth: number;
|
||||
|
||||
@IsInt()
|
||||
@Min(7)
|
||||
// @Min(7)
|
||||
@Max(12)
|
||||
spreadFactor: number;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user