Initial 1.3.x rework
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
import { IsBoolean, IsEnum, IsInt, Length } from "class-validator";
|
||||
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export class CannedMessageValidation
|
||||
implements Protobuf.ModuleConfig_CannedMessageConfig
|
||||
{
|
||||
@IsBoolean()
|
||||
rotary1Enabled: boolean;
|
||||
|
||||
@IsInt()
|
||||
inputbrokerPinA: number;
|
||||
|
||||
@IsInt()
|
||||
inputbrokerPinB: number;
|
||||
|
||||
@IsInt()
|
||||
inputbrokerPinPress: number;
|
||||
|
||||
@IsEnum(Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar)
|
||||
inputbrokerEventCw: Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar;
|
||||
|
||||
@IsEnum(Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar)
|
||||
inputbrokerEventCcw: Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar;
|
||||
|
||||
@IsEnum(Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar)
|
||||
inputbrokerEventPress: Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar;
|
||||
|
||||
@IsBoolean()
|
||||
updown1Enabled: boolean;
|
||||
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
|
||||
@Length(2, 30)
|
||||
allowInputSource: string;
|
||||
|
||||
@IsBoolean()
|
||||
sendBell: boolean;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { IsInt } from "class-validator";
|
||||
|
||||
import type { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export class ExternalNotificationValidation
|
||||
implements Protobuf.ModuleConfig_ExternalNotificationConfig
|
||||
{
|
||||
enabled: boolean;
|
||||
|
||||
@IsInt()
|
||||
outputMs: number;
|
||||
|
||||
@IsInt()
|
||||
output: number;
|
||||
|
||||
active: boolean;
|
||||
|
||||
alertMessage: boolean;
|
||||
|
||||
alertBell: boolean;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { IsBoolean, Length } from "class-validator";
|
||||
|
||||
import type { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export class MQTTValidation implements Protobuf.ModuleConfig_MQTTConfig {
|
||||
@IsBoolean()
|
||||
disabled: boolean;
|
||||
|
||||
@Length(0, 30)
|
||||
address: string;
|
||||
|
||||
@Length(0, 30)
|
||||
username: string;
|
||||
|
||||
@Length(0, 30)
|
||||
password: string;
|
||||
|
||||
@IsBoolean()
|
||||
encryptionEnabled: boolean;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { IsBoolean, IsInt } from "class-validator";
|
||||
|
||||
import type { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export class RangeTestValidation
|
||||
implements Protobuf.ModuleConfig_RangeTestConfig
|
||||
{
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
|
||||
@IsInt()
|
||||
sender: number;
|
||||
|
||||
@IsBoolean()
|
||||
save: boolean;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { IsBoolean, IsEnum, IsInt } from "class-validator";
|
||||
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export class SerialValidation implements Protobuf.ModuleConfig_SerialConfig {
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
|
||||
@IsBoolean()
|
||||
echo: boolean;
|
||||
|
||||
@IsInt()
|
||||
rxd: number;
|
||||
|
||||
@IsInt()
|
||||
txd: number;
|
||||
|
||||
@IsEnum(Protobuf.ModuleConfig_SerialConfig_Serial_Baud)
|
||||
baud: Protobuf.ModuleConfig_SerialConfig_Serial_Baud;
|
||||
|
||||
@IsInt()
|
||||
timeout: number;
|
||||
|
||||
@IsEnum(Protobuf.ModuleConfig_SerialConfig_Serial_Mode)
|
||||
mode: Protobuf.ModuleConfig_SerialConfig_Serial_Mode;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { IsBoolean, IsInt } from "class-validator";
|
||||
|
||||
import type { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export class StoreForwardValidation
|
||||
implements Protobuf.ModuleConfig_StoreForwardConfig
|
||||
{
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
|
||||
@IsBoolean()
|
||||
heartbeat: boolean;
|
||||
|
||||
@IsInt()
|
||||
records: number;
|
||||
|
||||
@IsInt()
|
||||
historyReturnMax: number;
|
||||
|
||||
@IsInt()
|
||||
historyReturnWindow: number;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { IsBoolean, IsEnum, IsInt } from "class-validator";
|
||||
|
||||
import { Protobuf } from "@meshtastic/meshtasticjs";
|
||||
|
||||
export class TelemetryValidation
|
||||
implements Protobuf.ModuleConfig_TelemetryConfig
|
||||
{
|
||||
@IsInt()
|
||||
deviceUpdateInterval: number;
|
||||
|
||||
@IsInt()
|
||||
environmentUpdateInterval: number;
|
||||
|
||||
@IsBoolean()
|
||||
environmentMeasurementEnabled: boolean;
|
||||
|
||||
@IsBoolean()
|
||||
environmentScreenEnabled: boolean;
|
||||
|
||||
@IsInt()
|
||||
environmentReadErrorCountThreshold: number;
|
||||
|
||||
@IsInt()
|
||||
environmentRecoveryInterval: number;
|
||||
|
||||
@IsBoolean()
|
||||
environmentDisplayFahrenheit: boolean;
|
||||
|
||||
@IsEnum(Protobuf.TelemetrySensorType)
|
||||
environmentSensorType: Protobuf.TelemetrySensorType;
|
||||
|
||||
@IsInt()
|
||||
environmentSensorPin: number;
|
||||
}
|
||||
Reference in New Issue
Block a user