Skip to content

Commit 0bde616

Browse files
committed
Update installer and nitpicks
1 parent 5ab7948 commit 0bde616

File tree

7 files changed

+19
-18
lines changed

7 files changed

+19
-18
lines changed

docs/gettingstarted/installer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ MoonLight v0.6.0, 7 November 2025
1212

1313
| Name | Image* | Flash | Shop & Board presets |
1414
|------|--------|-------|----------------------|
15+
| esp32-d0 | ![esp32-d0](../firmware/installer/images/esp32-d0.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-d0.json"></esp-web-install-button> | [Dig Uno](https://quinled.info/pre-assembled-quinled-dig-uno/):<br>![Dig Uno](https://quinled.info/wp-content/uploads/2020/02/QuinLED-Dig-Uno-v3_front.png){: style="width:100px"}<br>[Dig Quad](https://quinled.info/pre-assembled-quinled-dig-quad/):<br>![Dig Quad](https://quinled.info/wp-content/uploads/2021/11/QuinLED-Dig-Quad-AB_v3r1-2048x1154.png){: style="width:100px"} |
16+
| esp32-d0-16mb | ![esp32-d0-16mb](../firmware/installer/images/esp32-d0-16mb.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-d0-16mb.json"></esp-web-install-button> | [Dig Octa](https://quinled.info/quinled-dig-octa/):<br>![Dig Octa](https://quinled.info/wp-content/uploads/2024/10/20240924_141857-2048x1444.png){: style="width:100px"}<br>[Serg ESP32](https://www.tindie.com/products/serg74/esp32-wroom-usb-c-d1-mini32-form-factor-board/){:target="_blank"} and [Shield](https://www.tindie.com/products/serg74/wled-shield-board-for-addressable-leds/)<br>![Shield](https://cdn.tindiemedia.com/images/resize/44YE-eNQ9pJQUh_SmtwwfBXFbAE=/p/fit-in/1370x912/filters:fill(fff)/i/93057/products/2021-08-14T14%3A44%3A14.418Z-shield_v3-1.jpg?1628927139){: style="width:100px"} |
1517
| esp32-s3-devkitc-1-n8r8v | ![esp32-s3-devkitc-1-n8r8v](../firmware/installer/images/esp32-s3-devkitc-1-n8r8v.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-s3-devkitc-1-n8r8v.json"></esp-web-install-button> | SE-16p<br>![SE-16p](../firmware/installer/images/esp32-s3-stephanelec-16p.jpg){: style="width:100px"} |
1618
| esp32-s3-devkitc-1-n16r8v | ![esp32-s3-devkitc-1-n16r8v](../firmware/installer/images/esp32-s3-devkitc-1-n8r8v.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-s3-devkitc-1-n16r8v.json"></esp-web-install-button> | [Ali*](https://s.click.aliexpress.com/e/_DBAtJ2H){:target="_blank"} |
1719
| esp32-s3-atoms3r | ![esp32-s3-atoms3r](../firmware/installer/images/esp32-s3-atoms3r.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-s3-atoms3r.json"></esp-web-install-button> | [M5Stack store](https://shop.m5stack.com/products/atoms3r-dev-kit){:target="_blank"} |
1820
| esp32-s3-zero-n4r2 | ![esp32-s3-zero-n4r2](../firmware/installer/images/esp32-s3-zero-n4r2.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-s3-zero-n4r2.json"></esp-web-install-button> | [Ali*](https://s.click.aliexpress.com/e/_EukjHX8){:target="_blank"} |
19-
| esp32-d0-16mb | ![esp32-d0-16mb](../firmware/installer/images/esp32-d0-16mb.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-d0-16mb.json"></esp-web-install-button> | [Serg74](https://www.tindie.com/products/serg74/esp32-wroom-usb-c-d1-mini32-form-factor-board/){:target="_blank"}<br>![Shield](https://cdn.tindiemedia.com/images/resize/44YE-eNQ9pJQUh_SmtwwfBXFbAE=/p/fit-in/1370x912/filters:fill(fff)/i/93057/products/2021-08-14T14%3A44%3A14.418Z-shield_v3-1.jpg?1628927139){: style="width:100px"} |
20-
| esp32-d0 | ![esp32-d0](../firmware/installer/images/esp32-d0.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-d0.json"></esp-web-install-button> | [Dig Uno](https://quinled.info/pre-assembled-quinled-dig-uno/):<br>![Dig Uno](https://quinled.info/wp-content/uploads/2020/02/QuinLED-Dig-Uno-v3_front.png){: style="width:100px"}<br>[Dig Quad](https://quinled.info/pre-assembled-quinled-dig-quad/):<br>![Dig Quad](https://quinled.info/wp-content/uploads/2021/11/QuinLED-Dig-Quad-AB_v3r1-2048x1154.png){: style="width:100px"} |
2121
| esp32-p4-nano | ![esp32-p4-nano](../firmware/installer/images/esp32-p4-nano.jpg){: style="width:100px"} | [esp32-c6-firmware-update](https://esp32-c6-firmware-update.github.io/) * <br><esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-p4-nano.json"></esp-web-install-button> | [Waveshare](https://www.waveshare.com/esp32-p4-nano.htm){:target="_blank"} <br>[ESP32-P4 shield](https://shop.myhome-control.de/en/ABC-WLED-ESP32-P4-shield/HW10027):<br>![ESP32-P4 shield](https://shop.myhome-control.de/thumbnail/ed/a1/f1/1762031307/WLED_ESP32_P4_Shield_04_1920x1354.jpg?ts=1762031316){: style="width:100px"} |
2222
| esp32-d0-wrover | ![esp32-d0-wrover](../firmware/installer/images/esp32-d0-wrover.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-d0-wrover.json"></esp-web-install-button> | [Ali*](https://a.aliexpress.com/_EzhPi6g){:target="_blank"} |
2323
| esp32-d0-wrover-moonbase | ![esp32-d0-wrover](../firmware/installer/images/esp32-d0-wrover.jpg){: style="width:100px"} | <esp-web-install-button manifest="https://moonmodules.org/MoonLight/firmware/installer/manifest_esp32-d0-wrover-moonbase.json"></esp-web-install-button> | [Ali*](https://a.aliexpress.com/_EzhPi6g){:target="_blank"} |

src/MoonBase/Modules/ModuleIO.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ enum IO_Boards {
8484

8585
class ModuleIO : public Module {
8686
public:
87-
ESP32SvelteKit* _sveltekit;
88-
8987
ModuleIO(PsychicHttpServer* server, ESP32SvelteKit* sveltekit) : Module("inputoutput", server, sveltekit) {
9088
EXT_LOGV(MB_TAG, "constructor");
9189

@@ -95,7 +93,7 @@ class ModuleIO : public Module {
9593

9694
_sveltekit = sveltekit;
9795

98-
addUpdateHandler([&](const String& originId) { readPins(); }, false);
96+
addUpdateHandler([this](const String& originId) { readPins(); }, false);
9997
}
10098

10199
void setupDefinition(const JsonArray& controls) override {
@@ -322,7 +320,7 @@ class ModuleIO : public Module {
322320
// pinAssigner.assignPin(15, pin_I2S_SCK;
323321
// pinAssigner.assignPin(32, pin_Exposed;
324322
} else if (boardID == board_QuinLEDDigOctoV2) {
325-
//Dig-Octa-32-8L
323+
// Dig-Octa-32-8L
326324
uint8_t ledPins[8] = {0, 1, 2, 3, 4, 5, 12, 13}; // LED_PINS
327325
for (int i = 0; i < sizeof(ledPins); i++) pinAssigner.assignPin(ledPins[i], pin_LED);
328326
pinAssigner.assignPin(33, pin_Relay);
@@ -506,6 +504,9 @@ class ModuleIO : public Module {
506504
#endif
507505
#endif
508506
}
507+
508+
private:
509+
ESP32SvelteKit* _sveltekit;
509510
};
510511

511512
#endif

src/MoonBase/NodeManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class NodeManager : public Module {
3838
// if (false)
3939
// if file changes, read the file and bring into state
4040
// create a handler which recompiles the live script when the file of a current running live script changes in the File Manager
41-
_fileManager->addUpdateHandler([&](const String& originId) {
41+
_fileManager->addUpdateHandler([this](const String& originId) {
4242
EXT_LOGV(ML_TAG, "FileManager::updateHandler %s", originId.c_str());
4343
// read the file state (read all files and folders on FS and collect changes)
4444
_fileManager->read([&](FilesState& filesState) {

src/MoonLight/Modules/ModuleDrivers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class ModuleDrivers : public NodeManager {
7373
nodes = &layerP.nodes;
7474
NodeManager::begin();
7575

76-
_moduleIO->addUpdateHandler([&](const String& originId) { readPins(); }, false);
76+
_moduleIO->addUpdateHandler([this](const String& originId) { readPins(); }, false);
7777
}
7878

7979
void addNodes(const JsonObject& control) override {

src/MoonLight/Modules/ModuleLightsControl.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class ModuleLightsControl : public Module {
4545
setPresetsFromFolder(); // set the right values during boot
4646

4747
// update presets if files changed in presets folder
48-
_fileManager->addUpdateHandler([&](const String& originId) {
48+
_fileManager->addUpdateHandler([this](const String& originId) {
4949
EXT_LOGV(ML_TAG, "FileManager::updateHandler %s", originId.c_str());
5050
// read the file state (read all files and folders on FS and collect changes)
5151
_fileManager->read([&](FilesState& filesState) {
@@ -65,7 +65,7 @@ class ModuleLightsControl : public Module {
6565
}
6666
});
6767
});
68-
moduleIO.addUpdateHandler([&](const String& originId) { readPins(); }, false);
68+
moduleIO.addUpdateHandler([this](const String& originId) { readPins(); }, false);
6969
readPins(); // initially
7070
}
7171

@@ -156,6 +156,8 @@ class ModuleLightsControl : public Module {
156156
};
157157
layerP.lights.header.brightness = newBri;
158158
} else if (updatedItem.name == "palette") {
159+
const size_t nrOfPaletteEntries = sizeof(layerP.palette.entries) / sizeof(CRGB);
160+
159161
if (updatedItem.value == 0)
160162
layerP.palette = CloudColors_p;
161163
else if (updatedItem.value == 1)
@@ -177,14 +179,12 @@ class ModuleLightsControl : public Module {
177179
layerP.palette[i] = CHSV(random8(), 255, 255); // take the max saturation, max brightness of the colorwheel
178180
}
179181
} else if (updatedItem.value == 9) { // Quin palette
180-
size_t size = sizeof(layerP.palette.entries) / sizeof(CRGB);
181-
for (int i = 0; i < size; i++) {
182-
layerP.palette[i] = CRGB(map(i, 0, size - 1, 255, 0), map(i, 0, size - 1, 31, 0), map(i, 0, size - 1, 0, 255)); // from orange to blue
182+
for (int i = 0; i < nrOfPaletteEntries; i++) {
183+
layerP.palette[i] = CRGB(map(i, 0, nrOfPaletteEntries - 1, 255, 0), map(i, 0, nrOfPaletteEntries - 1, 31, 0), map(i, 0, nrOfPaletteEntries - 1, 0, 255)); // from orange to blue
183184
}
184185
} else if (updatedItem.value == 10) { // Orange palette
185-
size_t size = sizeof(layerP.palette.entries) / sizeof(CRGB);
186-
for (int i = 0; i < size; i++) {
187-
layerP.palette[i] = CRGB(255, map(i, 0, size - 1, 0, 255), 0); // from orange to blue
186+
for (int i = 0; i < nrOfPaletteEntries; i++) {
187+
layerP.palette[i] = CRGB(255, map(i, 0, nrOfPaletteEntries - 1, 0, 255), 0); // from red via orange to yellow
188188
}
189189
} else {
190190
layerP.palette = PartyColors_p; // should never occur

src/MoonLight/Modules/ModuleLiveScripts.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ModuleLiveScripts : public Module {
3737
Module::begin();
3838
#if FT_ENABLED(FT_LIVESCRIPT)
3939
// create a handler which recompiles the live script when the file of a current running live script changes in the File Manager
40-
_fileManager->addUpdateHandler([&](const String& originId) {
40+
_fileManager->addUpdateHandler([this](const String& originId) {
4141
EXT_LOGV(ML_TAG, "FileManager::updateHandler %s", originId.c_str());
4242
// read the file state (read all files and folders on FS and collect changes)
4343
_fileManager->read([&](FilesState& filesState) {

src/MoonLight/Nodes/Drivers/D_Infrared.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class IRDriver : public Node {
9090
addControlValue("Athom"); // see https://www.athom.tech/blank-1/wled-esp32-music-addressable-led-strip-controller
9191
addControlValue("Luxceo");
9292

93-
moduleIO->addUpdateHandler([&](const String& originId) { readPins(); }, false);
93+
moduleIO->addUpdateHandler([this](const String& originId) { readPins(); }, false);
9494
readPins(); // initially
9595
}
9696

0 commit comments

Comments
 (0)