You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
764 B
32 lines
764 B
import type { Message } from "@bufbuild/protobuf";
|
|
import { Protobuf } from "@meshtastic/js";
|
|
import { IsBoolean, IsEnum, IsInt } from "class-validator";
|
|
|
|
export class SerialValidation
|
|
implements
|
|
Omit<Protobuf.ModuleConfig.ModuleConfig_SerialConfig, keyof Message>
|
|
{
|
|
@IsBoolean()
|
|
enabled: boolean;
|
|
|
|
@IsBoolean()
|
|
echo: boolean;
|
|
|
|
@IsInt()
|
|
rxd: number;
|
|
|
|
@IsInt()
|
|
txd: number;
|
|
|
|
@IsEnum(Protobuf.ModuleConfig.ModuleConfig_SerialConfig_Serial_Baud)
|
|
baud: Protobuf.ModuleConfig.ModuleConfig_SerialConfig_Serial_Baud;
|
|
|
|
@IsInt()
|
|
timeout: number;
|
|
|
|
@IsEnum(Protobuf.ModuleConfig.ModuleConfig_SerialConfig_Serial_Mode)
|
|
mode: Protobuf.ModuleConfig.ModuleConfig_SerialConfig_Serial_Mode;
|
|
|
|
@IsBoolean()
|
|
overrideConsoleSerialPort: boolean;
|
|
}
|
|
|