2.0 Overhaul start
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
import { IsBoolean, IsEnum } from "class-validator";
|
||||
import { IsBoolean, IsEnum } from 'class-validator';
|
||||
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
import { Protobuf } from '@meshtastic/meshtasticjs';
|
||||
|
||||
export class DeviceValidation implements Protobuf.Config_DeviceConfig {
|
||||
@IsEnum(Protobuf.Config_DeviceConfig_Role)
|
||||
role: Protobuf.Config_DeviceConfig_Role;
|
||||
|
||||
@IsBoolean()
|
||||
serialDisabled: boolean;
|
||||
|
||||
@IsBoolean()
|
||||
factoryReset: boolean;
|
||||
serialEnabled: boolean;
|
||||
|
||||
@IsBoolean()
|
||||
debugLogEnabled: boolean;
|
||||
|
||||
@@ -3,10 +3,8 @@ import { IsArray, IsBoolean, IsEnum, IsInt, Max, Min } from "class-validator";
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export class LoRaValidation implements Protobuf.Config_LoRaConfig {
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
@Max(10)
|
||||
txPower: number;
|
||||
@IsBoolean()
|
||||
usePreset: boolean;
|
||||
|
||||
@IsEnum(Protobuf.Config_LoRaConfig_ModemPreset)
|
||||
modemPreset: Protobuf.Config_LoRaConfig_ModemPreset;
|
||||
@@ -36,7 +34,11 @@ export class LoRaValidation implements Protobuf.Config_LoRaConfig {
|
||||
hopLimit: number;
|
||||
|
||||
@IsBoolean()
|
||||
txDisabled: boolean;
|
||||
txEnabled: boolean;
|
||||
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
txPower: number;
|
||||
|
||||
@IsArray()
|
||||
ignoreIncoming: number[];
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import { IsBoolean, IsInt } from "class-validator";
|
||||
import { IsBoolean, IsInt } from 'class-validator';
|
||||
|
||||
import type { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
import type { Protobuf } from '@meshtastic/meshtasticjs';
|
||||
|
||||
export class PositionValidation implements Protobuf.Config_PositionConfig {
|
||||
@IsInt()
|
||||
positionBroadcastSecs: number;
|
||||
|
||||
@IsBoolean()
|
||||
positionBroadcastSmartDisabled: boolean;
|
||||
positionBroadcastSmartEnabled: boolean;
|
||||
|
||||
@IsBoolean()
|
||||
fixedPosition: boolean;
|
||||
|
||||
@IsBoolean()
|
||||
gpsDisabled: boolean;
|
||||
gpsEnabled: boolean;
|
||||
|
||||
@IsInt()
|
||||
gpsUpdateInterval: number;
|
||||
|
||||
Reference in New Issue
Block a user