Convert PSRAM to MB in usage reporting (#5130)
* Initial plan * Convert PSRAM from bytes to MB in usage reporting JavaScript Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com> * Use 1024*1024 instead of magic number for bytes to MB conversion Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
This commit is contained in:
@@ -3443,7 +3443,7 @@ function reportUpgradeEvent(info, oldVersion) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Add optional fields if available
|
// Add optional fields if available
|
||||||
if (infoData.psram !== undefined) upgradeData.psramSize = infoData.psram;
|
if (infoData.psram !== undefined) upgradeData.psramSize = Math.round(infoData.psram / (1024 * 1024)); // convert bytes to MB
|
||||||
// Note: partitionSizes not currently available in /json/info endpoint
|
// Note: partitionSizes not currently available in /json/info endpoint
|
||||||
|
|
||||||
// Make AJAX call to postUpgradeEvent API
|
// Make AJAX call to postUpgradeEvent API
|
||||||
|
|||||||
Reference in New Issue
Block a user