add default color for public lamps

Signed-off-by: dragonchaser <christian@boltares.de>
This commit is contained in:
dragonchaser
2025-07-15 09:04:03 +02:00
parent b910804cc7
commit d2ebff8d60

View File

@@ -88,6 +88,7 @@ const std::map<String, void*> 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 std::map<String, void*> whiteList = {};
#define LED_DEFAULT_COLOR_ON CRGB::DarkOrange
#elif DEVICE_TYPE == DEVICE_TYPE_PRIVATE_LAMP
// This is a PRIVATE LAMP, restricted to a list of users
@@ -98,6 +99,7 @@ const std::map<String, void*> blackList = {
static const std::map<String, void*> whiteList = {
{ "36E898", nullptr },
};
#define LED_DEFAULT_COLOR_ON CRGB::Black
#elif DEVICE_TYPE == DEVICE_TYPE_AMULETT
// This is an portable device, restricted to a list of users
@@ -108,6 +110,7 @@ const std::map<String, void*> blackList = {
static const std::map<String, void*> whiteList = {
{ "36E898", nullptr },
};
#define LED_DEFAULT_COLOR_ON CRGB::Black
#else
#error "Unknown DEVICE_TYPE"
@@ -299,7 +302,7 @@ void UpdatePalette() {
}
if (colors.empty()) {
fill_solid(pal.entries, LED_PALETTE_SIZE, CRGB::Black);
fill_solid(pal.entries, LED_PALETTE_SIZE, LED_DEFAULT_COLOR_ON);
} else {
for (int i=0; i<LED_PALETTE_SIZE; i++) {
pal[i] = CRGB(StrToHex(colors[ i % deviceDatabase.size() ].c_str()));