Full support for Athom WLED Music Controller

- athom_music_esp32_4MB_M bin
- show flashsize in info tab and /getflash
- support of their ir-remote (24-key music)

Not supported yet
- mac addres in AP name (need to experiment with WLED_AP_SSID_UNIQUE)
This commit is contained in:
Ewoud
2023-03-21 12:51:29 +01:00
parent 81fd9be03a
commit b271168f81
6 changed files with 2261 additions and 2225 deletions

View File

@@ -69,6 +69,7 @@ default_envs =
esp8266pro_16MB_M
esp01_1MB_S
esp32_16MB_M_eth
athom_music_esp32_4MB_M
; Go to MoonModules environments for environments
@@ -1535,6 +1536,24 @@ board = esp32_16MB
board_build.partitions = tools/WLED_ESP32_16MB.csv ;; WLED standard for 16MB flash: 2MB firmware, 12 MB filesystem
;board_build.partitions = tools/WLED_ESP32_16MB_9MB_FS.csv ;; WLED extended for 16MB flash: 3.2MB firmware, 9 MB filesystem
[env:athom_music_esp32_4MB_M]
extends = esp32_4MB_M_base
build_flags = ${esp32_4MB_M_base.build_flags} ${Shield_SPM1423.build_flags}
-D WLED_AP_SSID_UNIQUE
-D WLED_RELEASE_NAME=athom_music_esp32_4MB_M
-D ABL_MILLIAMPS_DEFAULT=14500 ; Wemos max 10A
-D WLED_DISABLE_MQTT -D WLED_DISABLE_LOXONE
-D BTNPIN=0 -D RLYPIN=2 -D IRPIN=25 -D IRTYPE=9 -D LEDPIN=18 -D
-D AUDIOPIN=-1
; -D TEMPERATURE_PIN=23
-D FLD_PIN_SCL=-1 -D FLD_PIN_SDA=-1 ; use global!
-D HW_PIN_SCL=22 -D HW_PIN_SDA=21
-D HW_PIN_CLOCKSPI=-1 -D HW_PIN_MOSISPI=-1 -D HW_PIN_MISOSPI=-1 ; WLEDMM: is now also default but just to show we didn't agree on wemos pins for spi yet
; -D ENCODER_DT_PIN=35 -D ENCODER_CLK_PIN=39 -D ENCODER_SW_PIN=5 ; WLEDMM spec by @SERG74: use 35 and 39 instead of 18 and 19 (conflicts)
; -D PIR_SENSOR_PIN=-1
; -D PWM_PIN=-1
; -D WLED_USE_MY_CONFIG
; ESP32 WLED pico board with builtin ICS-43432 microphpone
[env:esp32_pico_4MB_M]
extends = esp32_4MB_M_base

View File

@@ -374,7 +374,8 @@
<textarea id="presetsGen" hidden="true"></textarea><br>
</div>
<br>
<span class="h">Made with <span id="heart">&#10084;&#xFE0E;</span> by Aircoookie and the <a href="https://wled.discourse.group/" target="_blank">WLED community</a></span>
<span class="h">WLED made with <span id="heart">&#10084;&#xFE0E;</span> by Aircoookie and the <a href="https://wled.discourse.group/" target="_blank">WLED community</a></span><br>
<span class="h">WLED MM made with <span id="heart">&#10084;&#xFE0E;</span> by Softhack007 & Ewowi and the <a href="https://discord.gg/8P7wGuqT/" target="_blank">WLED 2D & Audio Dev</a> community</span>
</div>
<div id="nodes" class="modal">

View File

@@ -644,6 +644,8 @@ function populateInfo(i)
var heap = i.freeheap/1000;
var heap = Math.round(i.freeheap/100)/10; // WLEDMM bugfix
var theap = (i.totalheap>0)?i.totalheap/1000:-1; //WLEDMM - total heap is not available on 8266
var flashsize = i.getflash/1000; //WLEDMM and Athom
flashsize = flashsize.toFixed(1); //WLEDMM and Athom
var pwr = i.leds.pwr;
var pwru = "Not calculated";
if (pwr > 1000) {pwr /= 1000; pwr = pwr.toFixed((pwr > 10) ? 0 : 1); pwru = pwr + " A";}
@@ -680,6 +682,7 @@ ${inforow("Filesystem",i.fs.u + "/" + i.fs.t + " kB (" +Math.round(i.fs.u*100/i.
${theap>0?inforow("Heap ☾",((i.totalheap-i.freeheap)/1000).toFixed(0)+"/"+theap.toFixed(0)+" kB"," ("+Math.round((i.totalheap-i.freeheap)/(10*theap))+"%)"):""}
${i.minfreeheap?inforow("Max used heap ☾",((i.totalheap-i.minfreeheap)/1000).toFixed(1)+" kB"," ("+Math.round((i.totalheap-i.minfreeheap)/(10*theap))+"%)"):""}
${inforow("Free heap",heap," kB")}
${inforow("Flash Size ☾",flashsize," kB")} <!--WLEDMM and Athom-->
${i.tpram?inforow("PSRAM ☾",(i.tpram/1024).toFixed(1)," kB"):""}
${i.psram?((i.tpram-i.psram)>16383?inforow("Used PSRAM ☾",((i.tpram-i.psram)/1024).toFixed(1)," kB"):inforow("Used PSRAM ☾",(i.tpram-i.psram)," B")):""}
${i.psusedram?((i.tpram-i.psusedram)>16383?inforow("Max used PSRAM ☾",((i.tpram-i.psusedram)/1024).toFixed(1)," kB"):inforow("Max used PSRAM ☾",(i.tpram-i.psusedram)," B")):""}

File diff suppressed because it is too large Load Diff

View File

@@ -892,6 +892,7 @@ void serializeInfo(JsonObject root)
#endif
root[F("lwip")] = 0; //deprecated
root[F("totalheap")] = ESP.getHeapSize(); //WLEDMM
root[F("getflash")] = ESP.getFlashChipSize(); //WLEDMM and Athom
#else
root[F("arch")] = "esp8266";
root[F("core")] = ESP.getCoreVersion();

View File

@@ -240,6 +240,11 @@ void initServer()
request->send(200, "text/plain", (String)ESP.getFreeHeap());
});
//WLEDMM and Athom
server.on("/getflash", HTTP_GET, [](AsyncWebServerRequest *request){
request->send(200, "text/plain", (String)ESP.getFlashChipSize());
});
server.on("/u", HTTP_GET, [](AsyncWebServerRequest *request){
if (handleIfNoneMatchCacheHeader(request)) return;
AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", PAGE_usermod, PAGE_usermod_length);