From d123f08181afa815cdd5a52bf31f12ad21984c7b Mon Sep 17 00:00:00 2001 From: Nicu Hodos Date: Mon, 2 Dec 2024 09:11:59 +0100 Subject: [PATCH] add flag to disable doorbell --- gateway/include/Protocol_Doorbell.h | 4 ++++ gateway/include/devices.h | 2 ++ gateway/platformio.ini | 2 +- gateway/src/gateway.cpp | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gateway/include/Protocol_Doorbell.h b/gateway/include/Protocol_Doorbell.h index 90444bf..1cd2478 100644 --- a/gateway/include/Protocol_Doorbell.h +++ b/gateway/include/Protocol_Doorbell.h @@ -1,4 +1,7 @@ #pragma once + +#if ENABLE_DOORBELL + #include "Protocol.h" #define BIT_LENGTH 40 @@ -56,3 +59,4 @@ private: interrupts(); } } doorbell; +#endif \ No newline at end of file diff --git a/gateway/include/devices.h b/gateway/include/devices.h index a70c97a..f6c2a80 100644 --- a/gateway/include/devices.h +++ b/gateway/include/devices.h @@ -121,6 +121,7 @@ Command* commands[] = { .addPreconfigured(HaESP::heapStats) .addPreconfigured(HaESP::restartInfo) .build(), +#if ENABLE_DOORBELL Builder