Skip to content

Commit 51d29d4

Browse files
committed
LEDs drivers as nodes, FastLED and Physical driver in default bins
Docs - Nodes: add SE16 layout and RippleYZ modifier UI == - Monitor: update header offsets Server ===== - pio.ini: add CONFIG_IDF_TARGET_ESP32 where not done, add HP_PHYSICAL_DRIVER as default, comment Virtual driver (WIP) - main: remove moduleLightsControl as done in Node - Utilities: add Coord3DTrivial (to use in lights.positions union), add Coord3D constructors and simplify - Effects, layouts, modifiers: use Coord3D constructor, update SE16Layout - Remove LedsDriver - Mods: Add Mods.cpp and add drivers - LightsControl: onUpdate: store rgb in layerP.lights.header.red/green/blue - Nodes: livescript remove Virtual driver vars and setPre/PostKill (WIP) - Physical layer: remove ledsDriver, add Driver nodes, add Lights header red/green/blue - Change AP IP to 4.3.2.1
1 parent 49a4789 commit 51d29d4

File tree

24 files changed

+14720
-14770
lines changed

24 files changed

+14720
-14770
lines changed

docs/general/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Install Moonlight onto an ESP32 using the MoonLight Web installer
3434

3535
<img width="200" alt="Screenshot 2025-06-07 at 20 58 22" src="https://github.com/user-attachments/assets/08894be5-e4ed-4ed8-b2ae-86a6ce5c9ef6" />
3636

37-
* **Step 9**: After connecting, MoonLight will show up in a **web browser** (all browsers supported). A new install will take some time to show up (up to a minute or sometimes 2). On some browsers, e.g. Safari, MoonLight pops up showing Connection to device lost repeatedly (bug). In that case, close this browser window and open MoonLight in a brower using 192.168.4.1 as URL. You will see this screen, select WiFi Station.
37+
* **Step 9**: After connecting, MoonLight will show up in a **web browser** (all browsers supported). A new install will take some time to show up (up to a minute or sometimes 2). On some browsers, e.g. Safari, MoonLight pops up showing Connection to device lost repeatedly (bug). In that case, close this browser window and open MoonLight in a browser using 4.3.2.1 as URL. You will see this screen, select WiFi Station.
3838

3939
<img width="400" alt="Screenshot 2025-06-07 at 20 59 19" src="https://github.com/user-attachments/assets/3d8bddfb-9f95-4317-891c-be8b90880541" />
4040

docs/general/pull-requests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Below lists are ordered in terms of likelyhood to be accepted:
5454
* CPU load (and main.cpp)
5555
* comment response.addHeader("Cache-Control", "public, immutable, max-age=31536000");
5656
* interface/source/routes/+layout.svelte
57-
* Don't show if captive portal: {#if (!window.location.href.includes("192.168.4.1") && $page.data.features.monitor)}
57+
* Show monitor only on moon functions (so captive portal on small screen looks fine): #if (page.data.features.monitor && page.url.pathname.includes("moon"))
5858
* main.cpp: esp_log_set_vprintf(my_vprintf); WIP
5959
* ci pio
6060
* run in loopTask to avoid stack size crashes in httpd

docs/moonlight/nodes.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ Precompiled effects can be found in [effects](https://github.com/MoonModules/Moo
3333

3434
## Layout 🚥 Nodes
3535
🚧
36+
### SE16 🚥
37+
38+
Layout(s) for Stephan Electronics 16-Pin ESP32-S3 board, using the pins used on the board
39+
40+
* ledsPerPin: the number of LEDs connected to one pin
41+
* pinsAreColumns: are the leds on a pin a row of the effect (width is 1 (or 2) x ledsPerPin). If not set the leds are a column (height is 1 (or 2) x ledsPerPin)
42+
* mirroredPins: If set it is assumed that LEDs are connected with increasing positions on 8 pins on one side of the board and decreasing positions on the 8 pins of the other side of the board. The resulting size will have a width of 8 and the height (or width) will be 2 * ledsPerPin. If not set, the width will be 16 and the height (or width) = ledsPerPin
3643

3744
## Modifier 💎 Nodes
3845
🚧
@@ -48,6 +55,16 @@ Projects 1D/2D effects onto 2D/3D fixtures in a pinwheel pattern.
4855
* **Ztwist** option for 3D fixtures to twist the pattern along the z-axis.
4956
* The virtual layer width is the number of petals. The height is the distance from center to corner
5057

58+
### RippleYZ 💎💡💫
59+
60+
Takes lights of an effect and copies them to other lights. E.g. 1D effect will be rippled to 2D, 2D effect will be rippled to 3D
61+
62+
* shrink: shrinks the original size to towardsY and Z
63+
* towardsY: copies X into Y
64+
* towardsZ: copies XY into Z
65+
66+
Note: some effects already do this theirselves e.g. FreqMatrix runs on 1D but copies to 2D and 3D if size allows.
67+
5168
## Supporting ☸️ Nodes
5269
🚧
5370

docs/restfulapi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The back end exposes a number of API endpoints which are referenced in the table
1313
| POST | /rest/ntpSettings | `IS_ADMIN` | `{"enabled": true,"server": "time.google.com","tz_label": "Europe/London","tz_format": "GMT0BST,M3.5.0/1,M10.5.0"}` | Update the NTP settings |
1414
| GET | /rest/apStatus | `IS_AUTHENTICATED` | none | Current AP status and client information |
1515
| GET | /rest/apSettings | `IS_ADMIN` | none | Current AP settings |
16-
| POST | /rest/apSettings | `IS_ADMIN` | `{"provision_mode": 1,"ssid": "ESP32-SvelteKit-e89f6d20372c","password": "esp-sveltekit","channel": 1,"ssid_hidden": false,"max_clients": 4,"local_ip": "192.168.4.1","gateway_ip": "192.168.4.1","subnet_mask": "255.255.255.0"}` | Update AP settings |
16+
| POST | /rest/apSettings | `IS_ADMIN` | `{"provision_mode": 1,"ssid": "ESP32-SvelteKit-e89f6d20372c","password": "esp-sveltekit","channel": 1,"ssid_hidden": false,"max_clients": 4,"local_ip": "4.3.2.1","gateway_ip": "4.3.2.1","subnet_mask": "255.255.255.0"}` | Update AP settings 🌙 |
1717
| GET | /rest/wifiStatus | `IS_AUTHENTICATED` | none | Current status of the wifi client connection |
1818
| GET | /rest/scanNetworks | `IS_ADMIN` | none | Async Scan for Networks in Range |
1919
| GET | /rest/listNetworks | `IS_ADMIN` | none | List networks in range after successful scanning. Otherwise triggers scanning. |

factory_settings.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ build_flags =
1515
; Access point settings
1616
-D FACTORY_AP_PROVISION_MODE=AP_MODE_DISCONNECTED
1717
-D FACTORY_AP_SSID=\"MoonLight-#{unique_id}\" ; 1-64 characters, supports placeholders
18-
-D FACTORY_AP_PASSWORD=\"\" ; 8-64 characters
18+
-D FACTORY_AP_PASSWORD=\"\" ; 8-64 characters ; 🌙 empty ...
1919
-D FACTORY_AP_CHANNEL=1
2020
-D FACTORY_AP_SSID_HIDDEN=false
2121
-D FACTORY_AP_MAX_CLIENTS=4
22-
-D FACTORY_AP_LOCAL_IP=\"192.168.4.1\"
23-
-D FACTORY_AP_GATEWAY_IP=\"192.168.4.1\"
22+
-D FACTORY_AP_LOCAL_IP=\"4.3.2.1\" ; 🌙
23+
-D FACTORY_AP_GATEWAY_IP=\"4.3.2.1\" ; 🌙
2424
-D FACTORY_AP_SUBNET_MASK=\"255.255.255.0\"
2525

2626
; User credentials for admin and guest user

interface/src/routes/moonbase/monitor/Monitor.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
3838
let isPositions:number = header[0];
3939
let nrOfLights = header[4] + 256 * header[5];
40-
let channelsPerLight:number = header[7];
41-
let offsetRGB:number = header[8];
40+
let channelsPerLight:number = header[10];
41+
let offsetRGB:number = header[11];
4242
4343
if (!(isPositions==10)) {
4444
//(type == ct_Leds) {
@@ -71,14 +71,14 @@
7171
createScene(el);
7272
7373
let ledFactor: number = 1;//header[1];
74-
let ledSize: number = header[23];
74+
// let ledSize: number = header[23];
7575
width = header[1];
7676
height = header[2];
7777
depth = header[3];
7878
7979
let nrOfLights = header[4] + 256 * header[5];
8080
81-
console.log("Monitor.handleLayout", ledFactor, ledSize, nrOfLights, width, height, depth);
81+
console.log("Monitor.handleLayout", ledFactor, nrOfLights, width, height, depth);
8282
8383
for (let index = 0; index < nrOfLights * 3; index +=3) {
8484
// console.log(data[index], data[index+1], data[index+2]);

lib/framework/APSettingsService.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <DNSServer.h>
2525
#include <IPAddress.h>
2626

27+
//🌙 redundant as all set in factory_settings.ini
2728
#ifndef FACTORY_AP_PROVISION_MODE
2829
#define FACTORY_AP_PROVISION_MODE AP_MODE_DISCONNECTED
2930
#endif

0 commit comments

Comments
 (0)