Skip to content

Commit bc41b38

Browse files
Copilotnetmindz
andcommitted
Convert PSRAM to MB in usage reporting (#5130)
* Initial plan * Convert PSRAM from bytes to MB in usage reporting JavaScript Co-authored-by: netmindz <[email protected]> * Use 1024*1024 instead of magic number for bytes to MB conversion Co-authored-by: netmindz <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: netmindz <[email protected]>
1 parent 7a8f5d5 commit bc41b38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wled00/data/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3387,7 +3387,7 @@ function reportUpgradeEvent(info, oldVersion) {
33873387
};
33883388

33893389
// Add optional fields if available
3390-
if (infoData.psram !== undefined) upgradeData.psramSize = infoData.psram;
3390+
if (infoData.psram !== undefined) upgradeData.psramSize = Math.round(infoData.psram / (1024 * 1024)); // convert bytes to MB
33913391
// Note: partitionSizes not currently available in /json/info endpoint
33923392

33933393
// Make AJAX call to postUpgradeEvent API

0 commit comments

Comments
 (0)