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

@@ -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);