From a8882e4ff103d778a27d02bc000e0a8462d4fb7d Mon Sep 17 00:00:00 2001 From: dragonchaser Date: Tue, 15 Jul 2025 11:53:06 +0200 Subject: [PATCH] add public lamp & public lamp with default color Signed-off-by: dragonchaser --- btcontrol.ino | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/btcontrol.ino b/btcontrol.ino index 45ad870..0f9b2bb 100644 --- a/btcontrol.ino +++ b/btcontrol.ino @@ -73,16 +73,18 @@ static const PROGMEM std::map blackList = { }; #define DEVICE_TYPE_PUBLIC_LAMP 1 -#define DEVICE_TYPE_PRIVATE_LAMP 2 -#define DEVICE_TYPE_AMULETT 3 +#define DEVICE_TYPE_PUBLIC_LAMP_WITH_DEFAULT_COLOR 2 +#define DEVICE_TYPE_PRIVATE_LAMP 3 +#define DEVICE_TYPE_AMULETT 4 -#define DEVICE_TYPE DEVICE_TYPE_PRIVATE_LAMP +#define DEVICE_TYPE DEVICE_TYPE_PUBLIC_LAMP #ifndef DEVICE_TYPE // WE DO NOT HAVE A DEVICETYPE, so we do not have any variables here // to make sure the code compile fails #error "DEVICE_TYPE is not defined" + #elif DEVICE_TYPE == DEVICE_TYPE_PUBLIC_LAMP // This is a PUBLIC LAMP, no restrictions here // Does not have a vibration motor @@ -90,6 +92,15 @@ static const PROGMEM std::map blackList = { // WARNING: IF THIS LIST CONTAINS > 0 VALUES, NO OTHER DEVICES WILL BE ALLOWED // IF THIS LIST IS EMPTY IT WILL NOT BE USED static const PROGMEM std::map whiteList = {}; + #define LED_DEFAULT_COLOR_ON CRGB::Black + +#elif DEVICE_TYPE == DEVICE_TYPE_PUBLIC_LAMP_WITH_DEFAULT_COLOR + // This is a PUBLIC LAMP with a default color, no other restrictions here + // Does not have a vibration motor + static const PROGMEM bool useVibro = false; + // WARNING: IF THIS LIST CONTAINS > 0 VALUES, NO OTHER DEVICES WILL BE ALLOWED + // IF THIS LIST IS EMPTY IT WILL NOT BE USED + static const PROGMEM std::map whiteList = {}; #define LED_DEFAULT_COLOR_ON CRGB::DarkOrange #elif DEVICE_TYPE == DEVICE_TYPE_PRIVATE_LAMP