Skip to content

Commit 1e7a578

Browse files
committed
Small changes
1 parent 225a3f3 commit 1e7a578

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

src/MoonBase/Modules/ModuleIO.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ class ModuleIO : public Module {
110110
addControlValue(control, "QuinLED Dig Quad v3");
111111
addControlValue(control, "QuinLED Dig Octa v2");
112112
addControlValue(control, "QuinLED Dig 2Go");
113-
addControlValue(control, "Serg Universal Shield v5 🚧");
114-
addControlValue(control, "Serg Mini Shield 🚧");
113+
addControlValue(control, "Serg Universal Shield");
114+
addControlValue(control, "Serg Mini Shield");
115115
addControlValue(control, "Mathieu SE16 v1");
116116
addControlValue(control, "MHC D0 Shield 🚧");
117117
addControlValue(control, "MHC P4 Nano Shield");

src/MoonBase/Nodes.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,15 @@ void DriverNode::onUpdate(const Char<20>& oldValue, const JsonObject& control) {
520520
layer->layerP->lights.header.offsetRGB2 = 12;
521521
layer->layerP->lights.header.offsetZoom = 17;
522522
break;
523+
default:
524+
EXT_LOGW(ML_TAG, "Invalid lightPreset value: %d", header->lightPreset);
525+
// Fall back to GRB (most common default)
526+
header->lightPreset = lightPreset_GRB;
527+
header->channelsPerLight = 3;
528+
header->offsetRed = 1;
529+
header->offsetGreen = 0;
530+
header->offsetBlue = 2;
531+
break;
523532
}
524533

525534
EXT_LOGI(ML_TAG, "setLightPreset %d (cPL:%d, o:%d,%d,%d,%d)", header->lightPreset, header->channelsPerLight, header->offsetRed, header->offsetGreen, header->offsetBlue, header->offsetWhite);

src/MoonLight/Layers/PhysicalLayer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct LightsHeader {
5656
uint8_t offsetRGB3 = UINT8_MAX;
5757
uint8_t offsetBrightness2 = UINT8_MAX; // 31
5858
uint16_t nrOfChannels; // 32, so we can deal with exceptional cases e.g. RGB2040 make sure it starts at even position!!! for alignment!!!
59-
uint8_t lightPreset; // 34, so we can deal with exceptional cases e.g. RGB2040
59+
uint8_t lightPreset = UINT8_MAX; // 34, so we can deal with exceptional cases e.g. RGB2040
6060
// =============
6161
// 35 bytes total
6262
uint8_t fill[5]; // padding to align struct to 40 bytes total. lightsControl will send 37 bytes (prime number)!!! so Monitor.svelte can recognize this

0 commit comments

Comments
 (0)