2.0 Overhaul start

This commit is contained in:
Sacha Weatherstone
2022-09-22 16:35:40 +10:00
parent 4e45990ef5
commit a73eab1ea6
87 changed files with 2880 additions and 3573 deletions
+3 -6
View File
@@ -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;
+7 -5
View File
@@ -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[];
+4 -4
View File
@@ -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;