Updating to 800 if psram_size is >4MB.

This commit is contained in:
Clive Blackledge 2025-09-23 12:40:00 -07:00
parent 8a6f72f915
commit c47ff75323

View File

@ -52,10 +52,8 @@ static_assert(sizeof(meshtastic_NodeInfoLite) <= 200, "NodeInfoLite size increas
static inline int get_max_num_nodes()
{
uint32_t psram_size = ESP.getPsramSize() / (1024 * 1024); // Convert Bytes to MB
if (psram_size >= 8) {
if (psram_size >= 4) {
return 800;
} else if (psram_size >= 4) {
return 400;
}
uint32_t flash_size = ESP.getFlashChipSize() / (1024 * 1024); // Fallback based on flash size