mirror of
https://github.com/markqvist/RNode_Firmware.git
synced 2025-05-05 08:05:18 -04:00
Only raise low memory error if heap is actually low
This commit is contained in:
parent
bfc215b2a3
commit
960599c35a
1 changed files with 11 additions and 1 deletions
|
@ -1415,7 +1415,17 @@ void loop() {
|
|||
input_read();
|
||||
#endif
|
||||
|
||||
if (memory_low) { kiss_indicate_error(ERROR_MEMORY_LOW); memory_low = false; }
|
||||
if (memory_low) {
|
||||
#if PLATFORM == PLATFORM_ESP32
|
||||
if (esp_get_free_heap_size() < 8192) {
|
||||
kiss_indicate_error(ERROR_MEMORY_LOW); memory_low = false;
|
||||
} else {
|
||||
memory_low = false;
|
||||
}
|
||||
#else
|
||||
kiss_indicate_error(ERROR_MEMORY_LOW); memory_low = false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void sleep_now() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue