Skip to content

Commit 80a6496

Browse files
committed
Merge branch 'heap-optimize'
2 parents d59bdaa + 8df3f29 commit 80a6496

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+16160
-15552
lines changed

.coderabbit.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
language: auto
1+
language: "en-US"
22

33
review:
44
enable_review: true
55
enable_fix_suggestions: true
66
enable_tests_generation: false
77

8-
context:
9-
timeout_ms: 900000 # 15 minutes max
8+
context:
9+
timeout_ms: 900000 # 15 minutes max

docs/develop/modules.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ModuleDemo(PsychicHttpServer *server
3838
* Initialy create the module data
3939
4040
```cpp
41-
void setupDefinition(JsonArray root) override{
41+
void setupDefinition(const JsonArray& root) override{
4242
JsonObject control; // state.data has one or more properties
4343
JsonArray details; // if a control is an array, this is the details of the array
4444
JsonArray values; // if a control is a select, this is the values of the select
@@ -61,10 +61,10 @@ void setupDefinition(JsonArray root) override{
6161

6262
* Implement function **onUpdate** to define what happens if data changes
6363
* struct UpdatedItem defines the update (parent control (including index in case of multiple records), name of control and value)
64-
* This runs in the httpd / webserver task. To run it in another task (application task) use runInAppTask - see [ModuleLightsControl](https://github.com/MoonModules/MoonLight/blob/main/src/MoonLight/ModuleLightsControl.h)
64+
* UpdatedItems are created in the httpd / webserver task and via the loop() function sent to onUpdate running in the Sveltekit task. e.g. see [ModuleLightsControl](https://github.com/MoonModules/MoonLight/blob/main/src/MoonLight/ModuleLightsControl.h)
6565

6666
```cpp
67-
void onUpdate(UpdatedItem &updatedItem) override
67+
void onUpdate(const UpdatedItem &updatedItem) override
6868
{
6969
if (updatedItem.name == "lightsOn" || updatedItem.name == "brightness") {
7070
EXT_LOGD(MB_TAG, "handle %s = %s -> %s", updatedItem.name, updatedItem.oldValue.c_str(), updatedItem.value.as<String>().c_str());
@@ -76,7 +76,7 @@ void setupDefinition(JsonArray root) override{
7676
if (updatedItem.value.as<String>().length())
7777
compileAndRun(updatedItem.value);
7878
} else
79-
EXT_LOGD(MB_TAG, "no handle for %s.%s[%d] = %s -> %s", updatedItem.parent[0], updatedItem.name, updatedItem.index[0], updatedItem.oldValue.c_str(), updatedItem.value.as<String>().c_str());
79+
EXT_LOGD(MB_TAG, "no handle for %s.%s[%d] = %s -> %s", updatedItem.parent[0].c_str(), updatedItem.name.c_str(), updatedItem.index[0], updatedItem.oldValue.c_str(), updatedItem.value.as<String>().c_str());
8080
}
8181
```
8282

factory_settings.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ build_flags =
1616
-D FACTORY_AP_PROVISION_MODE=AP_MODE_DISCONNECTED
1717
-D FACTORY_AP_SSID=\"ML-#{unique_id}\" ; 1-64 characters, supports placeholders
1818
-D FACTORY_AP_PASSWORD=\"\" ; 8-64 characters ; 🌙 empty no password needed
19-
-D FACTORY_AP_CHANNEL=1
19+
-D FACTORY_AP_CHANNEL=6 ; // 🌙: See https://github.com/wled/WLED/commit/fc7993f4a7241739d1878df25fd4600100abc506
2020
-D FACTORY_AP_SSID_HIDDEN=false
2121
-D FACTORY_AP_MAX_CLIENTS=4
2222
-D FACTORY_AP_LOCAL_IP=\"4.3.2.1\" ; 🌙

firmware/esp32-d0.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ board_build.partitions = boards/ESP32_4MB_NO_OTA.csv
8686
; board_build.partitions = min_spiffs.csv
8787
build_flags = ${env.build_flags}
8888
-D CONFIG_IDF_TARGET_ESP32=1
89+
-D HTTPD_STACK_SIZE=6144 ; a bit more as there are no app tasks atm
8990
-D LOLIN_WIFI_FIX ; some boards have wifi issues if this is not defined, this sets WIFI_POWER_8_5dBm
9091
; -D LED_BUILTIN=2
9192
; -D KEY_BUILTIN=0
@@ -103,6 +104,7 @@ board_build.partitions = boards/ESP32_4MB_NO_OTA.csv
103104
; board_build.partitions = min_spiffs.csv
104105
build_flags = ${env.build_flags}
105106
-D CONFIG_IDF_TARGET_ESP32=1
107+
-D HTTPD_STACK_SIZE=6144 ; a bit more as there are no app tasks atm
106108
-D LOLIN_WIFI_FIX ; some boards have wifi issues if this is not defined, this sets WIFI_POWER_8_5dBm
107109
-D ARDUINO_USB_CDC_ON_BOOT=0 ; Make sure that the right HardwareSerial driver is picked in arduino-esp32 (needed on "classic ESP32")
108110
-DBOARD_HAS_PSRAM

firmware/esp32-p4.ini

Lines changed: 0 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -86,119 +86,3 @@ lib_deps = ${esp32-p4-base.lib_deps}
8686
; E (3783) H_SDIO_DRV: sdio card init failed
8787

8888
; FreeRTOS: FreeRTOS Task "sdio_read" should not return, Aborting now!
89-
90-
91-
; [env:esp32-p4-8MB_troyhacks_personal]
92-
; ;; THIS IS PIOARDUINO NOW, NOT PLATFORMIO!
93-
; ; build_src_filter = +<**/*.c>
94-
; ; +<**/*.cpp>
95-
; ; +<**/*.S>
96-
; ; -<**/dmx*>
97-
; ; -<**/async-mqtt-client/**>
98-
; ; -<**/methods/Esp32_i2s*>
99-
; ; -<**/espalexa/**>
100-
; ; -<**/DS1307RTC*>
101-
; ; -<**/dependencies/dmx>
102-
; ; platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.30-2/platform-espressif32.zip ;; https://github.com/troyhacks/platform-espressif32#Arduino/IDF5
103-
; ; platform_packages = framework-arduinoespressif32 @ https://github.com/troyhacks/arduino-esp32#feature/esp32p4
104-
; ; framework-arduinoespressif32-libs @ https://github.com/troyhacks/esp32-arduino-libs#main
105-
; ; toolchain-riscv32-esp @ https://github.com/espressif/crosstool-NG/releases/download/esp-14.2.0_20241119/riscv32-esp-elf-14.2.0_20241119-x86_64-w64-mingw32.zip
106-
; board_build.arduino.upstream_packages = no
107-
; board = esp32-p4-evboard
108-
; board_build.mcu = esp32p4
109-
; board_build.f_cpu = 360000000L
110-
; board_build.f_flash = 80000000L
111-
; ; board_build.arduino.memory_type = qio_opi
112-
; build_unflags = -O2
113-
; build_flags = ${esp32-p4-base.build_flags}
114-
; -Ofast
115-
; -ffast-math
116-
; -mstrict-align
117-
; -fipa-pta
118-
; -freorder-blocks
119-
; -fno-jump-tables
120-
; -fno-tree-switch-conversion
121-
; -Wwrite-strings
122-
; -fstrict-volatile-bitfields
123-
; -D WLEDMM_FASTPATH
124-
; -D WLEDMM_REMAP_AT_OUTPUT
125-
; -D PARLIO
126-
; ; -D WLED_DISABLE_LOGGING
127-
; ; -D PARLIO_TIMER
128-
; ; -D PARLIO_AUTO_OVERCLOCK
129-
; -D WLED_DANGEROUS_OPTIMIZATIONS
130-
; -D ARDUINO_EVENT_RUNNING_CORE=0
131-
; -D CONFIG_ASYNC_TCP_RUNNING_CORE=0
132-
; ; If you don't set PARLIO_PINS it's OK, it just sets all pins to disabled. Still "outputs" tho.
133-
; -D PARLIO_PINS=2,3,4,5,6,20,21,22,23,26,27,32,33,36,47,48 ;; GPIOs beyond 36 require some special ESP32-P4 LDO code or 47,48 don't work- added to WLED::setup()!
134-
; -D IMAGECACHE_BG_PRIORITY=1 ;; 1 is the lowst real priority, least run. 5 slows other things down.
135-
; -D CORE_DEBUG_LEVEL=0 ;; ESP_LOG_VERBOSE ;; ESP_LOG_VERBOSE == 5
136-
; -D WLED_USE_ETHERNET ;; Coexistence is slower but both work now. Ethernet is preferred automatically.
137-
; -D WLED_USE_ETHERNET_ONLY ;; Disable WiFi for performance reasons - on the P4 it needs high priority background tasks to talk to the C6
138-
; ; -D WLED_DEBUG
139-
; -D NDEBUG ;; comment this out if REALLY debugging for things like Parallel IO, PPA, etc
140-
; -D ARTNET_TIMER
141-
; -D MAX_LEDS=65535 ;; 18432
142-
; -D MAX_LEDS_PER_BUS=65535 ;; 18432
143-
; -D MAX_LED_MEMORY=64000000 ;; times ONE HUNDRED
144-
; -D DEFAULT_LED_TYPE=TYPE_NET_ARTNET_RGB
145-
; -D LEDPIN=192 ;; at least get 192.x.x.x set properly for Art-Net
146-
; -D BTNPIN=46 ;; Boot button is on GPIO 35 and works as a "button", but polling it messes up Ethernet.
147-
; -D CONFIG_ASYNC_TCP_TASK_STACK_SIZE=30000
148-
; -D BOARD_HAS_PSRAM
149-
; -D WLED_USE_PSRAM
150-
; ; -D WLED_USE_PSRAM_JSON
151-
; ; -D ALL_JSON_TO_PSRAM
152-
; -Wno-deprecated-declarations
153-
; -Wno-attributes
154-
; -D ESP_PLATFORM=1
155-
; -D WLED_USE_MY_CONFIG
156-
; -g
157-
; -D FASTLED_NO_FASTLED
158-
; -D WLED_RELEASE_NAME=ESP32-P4_16MB
159-
; -D WLED_WATCHDOG_TIMEOUT=100 ;; Setting >0 will make the watchdog not panic. Workaround for now.
160-
; -D USERMOD_AUDIOREACTIVE
161-
; -D USERMOD_AUTO_PLAYLIST
162-
; -D UM_AUDIOREACTIVE_USE_ESPDSP_FFT
163-
; -D SR_DMTYPE=9 ;; 9 = ES8311 (new) which is the codec chip on the ESP32-P4 EV board
164-
; -D SR_ENABLE_DEFAULT
165-
; ; -D TROYHACKS_FAILSAFE_BUSSES ;; in case you have a bus type causing resets during testing, turn this on, upload, busses will be removed at boot. Then reflash without this flag.
166-
; -D WLED_DISABLE_INFRARED
167-
; -D WLED_DISABLE_ESPNOW ;; not working yet due to API changes in v5.3
168-
; -D WLED_DISABLE_ALEXA
169-
; -D WLED_DISABLE_HUESYNC
170-
; -D WLED_DISABLE_MQTT
171-
; -D WLED_DISABLE_LOXONE
172-
; -D WLED_DISABLE_ADALIGHT ;; this no longer disables serial receive
173-
; -D CONFIG_ADC_SUPPRESS_DEPRECATE_WARN
174-
; -D CONFIG_I2S_SUPPRESS_DEPRECATE_WARN
175-
; -D WLED_DISABLE_IMPROV_WIFISCAN
176-
; -D USERMOD_ANIMARTRIX # needs to be changed from int to uint32_t in the base class: virtual void setPixelColor(uint32_t index, rgb pixel) = 0;
177-
; ; -D WLEDMM_NO_MAP_RESET
178-
; ; -D WLED_DEBUG_MAPS
179-
; ; -D ES8311_ADDR=0x18
180-
; lib_deps = ${esp32-p4-base.lib_deps}
181-
; ; https://github.com/Makuna/NeoPixelBus#CORE3 ;; https://github.com/troyhacks/NeoPixelBus#CORE3
182-
; ; https://github.com/softhack007/FastLED.git#ESP32-C6
183-
; ; https://github.com/troyhacks/ESPAsyncWebServer ;; #v2.3.0 ;; https://github.com/softhack007/ESPAsyncWebServer.git#ESP32-C6
184-
; ; https://github.com/netmindz/animartrix.git#e6b7509b391cab97b59b8eb19580e67d4203ae7d # needs to be changed from int to uint32_t in the base class: virtual void setPixelColor(uint32_t index, rgb pixel) = 0;
185-
; lib_ignore = IRremoteESP8266
186-
; ; WebServer
187-
; SD
188-
; SD_MMC
189-
; board_build.partitions = boards/TROYP4_ESP32_8MB_1500KB_FS.csv ;; WLED_ESP32_8MB.csv
190-
; board_build.flash_mode = qio
191-
; ; monitor_filters = esp32_exception_decoder, colorize
192-
; ; monitor_speed = 115200
193-
; upload_speed = 921600
194-
; ; framework = arduino
195-
; ; lib_compat_mode = strict
196-
; ; extra_scripts =
197-
; ; pre:pio-scripts/set_version.py
198-
; ; pre:pio-scripts/build-html.py
199-
; ; post:pio-scripts/output_bins.py
200-
; ; post:pio-scripts/strip-floats.py
201-
; ; pre:pio-scripts/user_config_copy.py
202-
; ; pre:pio-scripts/load_usermods.py
203-
; ; pre:pio-scripts/build_ui.py
204-
; ; post:pio-scripts/validate_modules.py ;; double-check the build output usermods

firmware/esp32-s3.ini

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,6 @@ lib_deps = ${esp32-s3-base.lib_deps}
8585
; Flash: [======= ] 71.4% (used 2245914 bytes from 3145728 bytes)
8686

8787

88-
; [env:esp32-s3-devkitc-1-n16r8vVD]
89-
; extends = env:esp32-s3-devkitc-1-n16r8v
90-
; build_flags =
91-
; ${env:esp32-s3-devkitc-1-n16r8v.build_flags}
92-
; ${HP_VIRTUAL_DRIVER.build_flags}
93-
; ; -D ML_LIVE_MAPPING
94-
; lib_deps =
95-
; ${env:esp32-s3-devkitc-1-n16r8v.lib_deps}
96-
; ${HP_VIRTUAL_DRIVER.lib_deps}
97-
98-
9988
[env:esp32-s3-zero-n4r2]
10089
; board = esp32-s3-zero-n4r2
10190
board_build.psram = enabled

interface/src/lib/types/models.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,6 @@ export type NetworkItem = {
4040
encryption_type: number;
4141
};
4242

43-
export type EthernetStatus = {
44-
status: number;
45-
ip_address: string;
46-
mac_address: string;
47-
};
48-
49-
export type EthernetSettings = {
50-
local_ip: string;
51-
gateway_ip: string;
52-
subnet_mask: string;
53-
};
54-
5543
export type ApStatus = {
5644
status: number;
5745
ip_address: string;
@@ -152,6 +140,8 @@ export type StaticSystemInformation = {
152140
flash_chip_size: number;
153141
flash_chip_speed: number;
154142
cpu_reset_reason: string;
143+
heap_info_app: string;
144+
heap_info_dma: string;
155145
};
156146

157147
export type SystemInformation = Analytics & StaticSystemInformation;

0 commit comments

Comments
 (0)