From 4684e092a87b73f812cad192df88f8de33a2e183 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Dec 2025 19:01:17 +0000 Subject: [PATCH] Update usage report to send hasPSRAM and psramSize fields - Modified reportUpgradeEvent in index.js to use new hasPSRAM and psramSize fields - Changed from calculating psramSize from free PSRAM to using total PSRAM size from /info endpoint - Both fields now correctly sent in upgrade usage reports to usage.wled.me Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com> --- wled00/data/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wled00/data/index.js b/wled00/data/index.js index 84b25618..76372859 100644 --- a/wled00/data/index.js +++ b/wled00/data/index.js @@ -3443,7 +3443,8 @@ function reportUpgradeEvent(info, oldVersion) { }; // Add optional fields if available - if (infoData.psram !== undefined) upgradeData.psramSize = Math.round(infoData.psram / (1024 * 1024)); // convert bytes to MB + if (infoData.hasPSRAM !== undefined) upgradeData.hasPSRAM = infoData.hasPSRAM; // Whether device has PSRAM + if (infoData.psramSize !== undefined) upgradeData.psramSize = infoData.psramSize; // Total PSRAM size in MB // Note: partitionSizes not currently available in /json/info endpoint // Make AJAX call to postUpgradeEvent API