Add Detection Sensor Module (#139)

* detection sensor

* bump version
This commit is contained in:
Ben Lipsey
2023-10-26 08:31:14 +10:00
committed by GitHub
parent aa75389cfe
commit 7256454ea7
5 changed files with 161 additions and 1 deletions
@@ -0,0 +1,35 @@
import { IsBoolean, IsInt, Length } from "class-validator";
import type { Protobuf } from "@meshtastic/meshtasticjs";
export class DetectionSensorValidation
implements
Omit<
Protobuf.ModuleConfig_DetectionSensorConfig,
keyof Protobuf.native.Message
>
{
@IsBoolean()
enabled: boolean;
@IsInt()
minimumBroadcastSecs: number;
@IsInt()
stateBroadcastSecs: number;
@IsBoolean()
sendBell: boolean;
@Length(0, 20)
name: string;
@IsInt()
monitorPin: number;
@IsBoolean()
detectionTriggeredHigh: boolean;
@IsBoolean()
usePullup: boolean;
}