Skip to content

Commit 33fb27d

Browse files
committed
Small changes
Back-end ======== - IO: rename Wladi to MCH (MyHome-Control) - Light Control: rename palette to MoonModules - MM Effects: GOL: infinite default on
1 parent fe195bb commit 33fb27d

File tree

9 files changed

+12800
-12797
lines changed

9 files changed

+12800
-12797
lines changed

docs/moonbase/inputoutput.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ For each board the following presets are defined:
5656
![Dig Quad](https://quinled.info/wp-content/uploads/2021/11/QuinLED-Dig-Quad-AB_v3r1-2048x1154.png){: style="width:100px"}
5757
![Dig Octa](https://quinled.info/wp-content/uploads/2024/10/20240924_141857-2048x1444.png){: style="width:100px"}
5858

59-
* [Dig 2Go](https://quinled.info/quinled-dig2go/), [Dig Uno](https://quinled.info/pre-assembled-quinled-dig-quad/), [Dig Quad](https://quinled.info/quinled-dig-octa/): Choose the esp32-d0 (4MB) board in the [MoonLight Installer](../../gettingstarted/installer/)
59+
* [Dig 2Go](https://quinled.info/quinled-dig2go/), [Dig Uno](https://quinled.info/pre-assembled-quinled-dig-uno/), [Dig Quad](https://quinled.info/pre-assembled-quinled-dig-quad/): Choose the esp32-d0 (4MB) board in the [MoonLight Installer](../../gettingstarted/installer/)
6060
* [Dig Octa](https://quinled.info/quinled-dig-octa/): Choose the esp32-d0-16mb board in the [MoonLight Installer](../../gettingstarted/installer/)
6161
* On first install, erase flash first (Especially when other firmware like WLED was on it) as MoonLight uses a partition scheme with 3MB of flash (currently no OTA support).
6262
* You might need to reset your router if you first run WLED on the same MCU and no new IP is assigned.

docs/moonlight/drivers.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ The Drivers module defines layers and drivers.
1313
* Audio driver
1414
* Sensor drivers (microphone, gyro, MIDI controller)
1515

16+
Layouts need to be defined before drivers as the driver takes the layouts defined before itself, e.g. to define which LEDs to drive on which pins.
17+
1618
## Controls
1719

1820
* Nodes: a list of Layouts and Drivers

interface/src/lib/types/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export type StaticSystemInformation = {
142142
cpu_reset_reason: string;
143143
heap_info_app: string; // 🌙
144144
heap_info_dma: string; // 🌙
145-
coprocessor: string; // 🌙
145+
coprocessor?: string; // 🌙 optional as only for ESP32-P4
146146
};
147147

148148
export type SystemInformation = Analytics & StaticSystemInformation;

lib/framework/SystemStatus.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ esp_err_t SystemStatus::systemStatus(PsychicRequest *request)
177177
#ifdef CONFIG_IDF_TARGET_ESP32P4
178178
esp_hosted_coprocessor_fwver_t c6_fw_version;
179179
esp_hosted_get_coprocessor_fwversion(&c6_fw_version);
180-
char hfw[10];
181-
snprintf(hfw, 32, "v%d.%d.%d", c6_fw_version.major1, c6_fw_version.minor1, c6_fw_version.patch1);
182-
root["coprocessor"] = hfw;
180+
char coprocessor[10];
181+
snprintf(coprocessor, sizeof(coprocessor), "v%d.%d.%d", c6_fw_version.major1, c6_fw_version.minor1, c6_fw_version.patch1);
182+
root["coprocessor"] = coprocessor;
183183
#endif
184184

185185
heapHealth(root["heap_info_app"].to<JsonVariant>(), MALLOC_CAP_INTERNAL);

lib/framework/WWWData.h

Lines changed: 12732 additions & 12731 deletions
Large diffs are not rendered by default.

src/MoonBase/Modules/ModuleIO.h

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ enum IO_Boards {
7373
board_SergUniShieldV5,
7474
board_SergMiniShield,
7575
board_SE16V1,
76-
board_WladiD0,
77-
board_WladiP4Nano,
76+
board_MHCD0, // by Wladi
77+
board_MHCP4Nano, // by Wladi
7878
board_YvesV48,
7979
board_TroyP4Nano,
8080
board_AtomS3,
@@ -341,27 +341,27 @@ class ModuleIO : public Module {
341341
pinAssigner.assignPin(23, pin_Exposed);
342342
pinAssigner.assignPin(25, pin_Exposed);
343343
// pinAssigner.assignPin(xx, pin_I2S_MCLK);
344-
// } else if (boardID == board_QuinLEDPenta) {
345-
// uint8_t ledPins[5] = {14, 13, 12, 4, 2}; // LED_PINS
346-
// for (int i = 0; i < sizeof(ledPins); i++) pinAssigner.assignPin(ledPins[i], pin_LED);
347-
// pinAssigner.assignPin(34, pin_ButtonPush);
348-
// pinAssigner.assignPin(35, pin_ButtonPush);
349-
// pinAssigner.assignPin(39, pin_ButtonPush);
350-
// pinAssigner.assignPin(1, pin_I2C_SDA);
351-
// pinAssigner.assignPin(3, pin_I2C_SCL);
352-
// } else if (boardID == board_QuinLEDPentaPlus) {
353-
// pinAssigner.assignPin(33, pin_LED_CW);
354-
// pinAssigner.assignPin(32, pin_LED_WW);
355-
// pinAssigner.assignPin(2, pin_LED_R);
356-
// pinAssigner.assignPin(4, pin_LED_G);
357-
// pinAssigner.assignPin(12, pin_LED_B);
358-
// pinAssigner.assignPin(36, pin_ButtonPush);
359-
// pinAssigner.assignPin(39, pin_ButtonPush);
360-
// pinAssigner.assignPin(33, pin_ButtonPush);
361-
// pinAssigner.assignPin(15, pin_I2C_SDA);
362-
// pinAssigner.assignPin(16, pin_I2C_SCL);
363-
// pinAssigner.assignPin(13, pin_Relay_LightsOn);
364-
// pinAssigner.assignPin(5, pin_LED);
344+
// } else if (boardID == board_QuinLEDPenta) {
345+
// uint8_t ledPins[5] = {14, 13, 12, 4, 2}; // LED_PINS
346+
// for (int i = 0; i < sizeof(ledPins); i++) pinAssigner.assignPin(ledPins[i], pin_LED);
347+
// pinAssigner.assignPin(34, pin_ButtonPush);
348+
// pinAssigner.assignPin(35, pin_ButtonPush);
349+
// pinAssigner.assignPin(39, pin_ButtonPush);
350+
// pinAssigner.assignPin(1, pin_I2C_SDA);
351+
// pinAssigner.assignPin(3, pin_I2C_SCL);
352+
// } else if (boardID == board_QuinLEDPentaPlus) {
353+
// pinAssigner.assignPin(33, pin_LED_CW);
354+
// pinAssigner.assignPin(32, pin_LED_WW);
355+
// pinAssigner.assignPin(2, pin_LED_R);
356+
// pinAssigner.assignPin(4, pin_LED_G);
357+
// pinAssigner.assignPin(12, pin_LED_B);
358+
// pinAssigner.assignPin(36, pin_ButtonPush);
359+
// pinAssigner.assignPin(39, pin_ButtonPush);
360+
// pinAssigner.assignPin(33, pin_ButtonPush);
361+
// pinAssigner.assignPin(15, pin_I2C_SDA);
362+
// pinAssigner.assignPin(16, pin_I2C_SCL);
363+
// pinAssigner.assignPin(13, pin_Relay_LightsOn);
364+
// pinAssigner.assignPin(5, pin_LED);
365365
} else if (boardID == board_SergMiniShield) {
366366
object["maxPower"] = 50; // 10A Fuse ...
367367
pinAssigner.assignPin(1, pin_LED);
@@ -371,9 +371,9 @@ class ModuleIO : public Module {
371371
pinAssigner.assignPin(1, pin_LED);
372372
pinAssigner.assignPin(3, pin_LED);
373373
pinAssigner.assignPin(19, pin_Relay_LightsOn);
374-
} else if (boardID == board_WladiD0) {
374+
} else if (boardID == board_MHCD0) {
375375
pinAssigner.assignPin(3, pin_Voltage);
376-
} else if (boardID == board_WladiP4Nano) { // https://shop.myhome-control.de/ABC-WLED-ESP32-P4-Shield/HW10027
376+
} else if (boardID == board_MHCP4Nano) { // https://shop.myhome-control.de/ABC-WLED-ESP32-P4-Shield/HW10027
377377
object["maxPower"] = 10; // USB compliant
378378
uint8_t ledPins[16] = {21, 20, 25, 5, 7, 23, 8, 27, 3, 22, 24, 4, 46, 47, 2, 48}; // LED_PINS
379379
for (int i = 0; i < sizeof(ledPins); i++) pinAssigner.assignPin(ledPins[i], pin_LED);

src/MoonLight/Modules/ModuleLightsControl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class ModuleLightsControl : public Module {
128128
addControlValue(control, "Party");
129129
addControlValue(control, "Heat");
130130
addControlValue(control, "Random");
131-
addControlValue(control, "Quin");
131+
addControlValue(control, "MoonModules");
132132
addControlValue(control, "Orange");
133133

134134
control = addControl(controls, "preset", "pad");
@@ -190,7 +190,7 @@ class ModuleLightsControl : public Module {
190190
for (int i = 0; i < sizeof(layerP.palette.entries) / sizeof(CRGB); i++) {
191191
layerP.palette[i] = CHSV(random8(), 255, 255); // take the max saturation, max brightness of the colorwheel
192192
}
193-
} else if (updatedItem.value == 9) { // Quin palette
193+
} else if (updatedItem.value == 9) { // MoonModules palette
194194
for (int i = 0; i < nrOfPaletteEntries; i++) {
195195
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
196196
}

src/MoonLight/Nodes/Effects/E_MoonModules.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class GameOfLifeEffect : public Node {
5858
bool wrap = true;
5959
bool disablePause = false;
6060
bool colorByAge = false;
61-
bool infinite = false;
61+
bool infinite = true;
6262
uint8_t blur = 128;
6363

6464
void setBirthAndSurvive() {

src/main.cpp

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -219,39 +219,39 @@ void setup() {
219219
safeModeMB = true;
220220
}
221221

222-
// check sizes ...
223-
sizeof(esp32sveltekit); // 4152
224-
sizeof(WiFiSettingsService); // 456
225-
sizeof(SystemStatus); // 16
226-
sizeof(UploadFirmwareService); // 32
227-
sizeof(HttpEndpoint<ModuleState>); // 152
228-
sizeof(EventEndpoint<ModuleState>); // 112
229-
sizeof(SharedEventEndpoint); // 8
230-
sizeof(WebSocketServer<ModuleState>); // 488
231-
sizeof(SharedWebSocketServer); // 352
232-
sizeof(FSPersistence<ModuleState>); // 128
233-
sizeof(PsychicHttpServer*); // 8
234-
sizeof(HttpEndpoint<APSettings>); // 152
235-
sizeof(SharedHttpEndpoint); // 16
236-
sizeof(FSPersistence<APSettings>); // 128
237-
sizeof(APSettingsService); // 600;
238-
sizeof(PsychicWebSocketHandler); // 336
239-
sizeof(fileManager); // 864
240-
sizeof(Module); // 1144 -> 472
241-
sizeof(moduleDevices); // 1320
242-
sizeof(moduleIO); // 1144
243-
#if FT_ENABLED(FT_MOONLIGHT)
244-
sizeof(moduleEffects); // 1208
245-
sizeof(moduleDrivers); // 1216
246-
sizeof(moduleLightsControl); // 1176
247-
#if FT_ENABLED(FT_LIVESCRIPT)
248-
sizeof(moduleLiveScripts); // 1176
249-
#endif
250-
sizeof(moduleChannels); // 1144
251-
sizeof(moduleMoonLightInfo); // 1144
252-
sizeof(layerP.lights); // 56
253-
sizeof(layerP.lights.header); // 40
254-
#endif
222+
// // check sizes ...
223+
// sizeof(esp32sveltekit); // 4152
224+
// sizeof(WiFiSettingsService); // 456
225+
// sizeof(SystemStatus); // 16
226+
// sizeof(UploadFirmwareService); // 32
227+
// sizeof(HttpEndpoint<ModuleState>); // 152
228+
// sizeof(EventEndpoint<ModuleState>); // 112
229+
// sizeof(SharedEventEndpoint); // 8
230+
// sizeof(WebSocketServer<ModuleState>); // 488
231+
// sizeof(SharedWebSocketServer); // 352
232+
// sizeof(FSPersistence<ModuleState>); // 128
233+
// sizeof(PsychicHttpServer*); // 8
234+
// sizeof(HttpEndpoint<APSettings>); // 152
235+
// sizeof(SharedHttpEndpoint); // 16
236+
// sizeof(FSPersistence<APSettings>); // 128
237+
// sizeof(APSettingsService); // 600;
238+
// sizeof(PsychicWebSocketHandler); // 336
239+
// sizeof(fileManager); // 864
240+
// sizeof(Module); // 1144 -> 472
241+
// sizeof(moduleDevices); // 1320
242+
// sizeof(moduleIO); // 1144
243+
// #if FT_ENABLED(FT_MOONLIGHT)
244+
// sizeof(moduleEffects); // 1208
245+
// sizeof(moduleDrivers); // 1216
246+
// sizeof(moduleLightsControl); // 1176
247+
// #if FT_ENABLED(FT_LIVESCRIPT)
248+
// sizeof(moduleLiveScripts); // 1176
249+
// #endif
250+
// sizeof(moduleChannels); // 1144
251+
// sizeof(moduleMoonLightInfo); // 1144
252+
// sizeof(layerP.lights); // 56
253+
// sizeof(layerP.lights.header); // 40
254+
// #endif
255255

256256
// start ESP32-SvelteKit
257257
esp32sveltekit.begin();

0 commit comments

Comments
 (0)