From b1f86466f0c311d24da021f5f7aa279459acd7df Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Wed, 28 Dec 2022 12:51:50 +1100 Subject: [PATCH] Update external notification settings --- .../ModuleConfig/ExternalNotification.tsx | 83 ++++++++++++++++++- .../moduleConfig/externalNotification.ts | 22 +++++ 2 files changed, 101 insertions(+), 4 deletions(-) diff --git a/src/components/PageComponents/ModuleConfig/ExternalNotification.tsx b/src/components/PageComponents/ModuleConfig/ExternalNotification.tsx index 8e70a0a5..9dff6f86 100644 --- a/src/components/PageComponents/ModuleConfig/ExternalNotification.tsx +++ b/src/components/PageComponents/ModuleConfig/ExternalNotification.tsx @@ -80,7 +80,7 @@ export const ExternalNotification = (): JSX.Element => { { + + { control={control} render={({ field: { value, ...rest } }) => ( + )} + /> + ( + + )} + /> + ( + { control={control} render={({ field: { value, ...rest } }) => ( + )} + /> + ( + + )} + /> + ( + { /> )} /> + ); }; diff --git a/src/validation/moduleConfig/externalNotification.ts b/src/validation/moduleConfig/externalNotification.ts index 4973e6b7..9a3489bc 100644 --- a/src/validation/moduleConfig/externalNotification.ts +++ b/src/validation/moduleConfig/externalNotification.ts @@ -5,6 +5,7 @@ import type { Protobuf } from "@meshtastic/meshtasticjs"; export class ExternalNotificationValidation implements Protobuf.ModuleConfig_ExternalNotificationConfig { + @IsBoolean() enabled: boolean; @IsInt() @@ -13,15 +14,36 @@ export class ExternalNotificationValidation @IsInt() output: number; + @IsInt() + outputVibra: number; + + @IsInt() + outputBuzzer: number; + @IsBoolean() active: boolean; @IsBoolean() alertMessage: boolean; + @IsBoolean() + alertMessageVibra: boolean + + @IsBoolean() + alertMessageBuzzer: boolean + @IsBoolean() alertBell: boolean; + @IsBoolean() + alertBellVibra: boolean; + + @IsBoolean() + alertBellBuzzer: boolean; + @IsBoolean() usePwm: boolean; + + @IsInt() + nagTimeout: number; }