Update deps, add ethernet config

This commit is contained in:
Sacha Weatherstone
2022-10-23 12:39:43 +10:00
parent 79e8ba70a6
commit aa01bb206f
7 changed files with 257 additions and 19 deletions
+25 -1
View File
@@ -1,4 +1,4 @@
import { IsBoolean, IsEnum, Length } from "class-validator";
import { IsBoolean, IsEnum, IsIP, Length } from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs";
@@ -17,4 +17,28 @@ export class NetworkValidation implements Protobuf.Config_NetworkConfig {
@Length(2, 30)
ntpServer: string;
@IsBoolean()
ethEnabled: boolean;
@IsEnum(Protobuf.Config_NetworkConfig_EthMode)
ethMode: Protobuf.Config_NetworkConfig_EthMode;
ethConfig: NetworkValidation_ethConfig;
}
export class NetworkValidation_ethConfig
implements Protobuf.Config_NetworkConfig_NetworkConfig
{
@IsIP()
ip: number;
@IsIP()
gateway: number;
@IsIP()
subnet: number;
@IsIP()
dns: number;
}