From 9b567fa844794a2aac9bbe461216c13d637c1347 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Tue, 15 May 2018 10:41:04 +0200 Subject: [PATCH] low memory threshold --- src/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 3cdd289e..7497274f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -627,10 +627,9 @@ void loop() { #endif // check free memory - //if (ESP.getFreeHeap() <= MEM_LOW) { if (esp_get_minimum_free_heap_size() <= MEM_LOW) { - // ESP_LOGI(TAG, "Counter cleared (memory low = %d Bytes)", ESP.getFreeHeap()); - ESP_LOGI(TAG, "Counter cleared (memory low water mark = %d Bytes)", esp_get_minimum_free_heap_size()); + ESP_LOGI(TAG, "Memory full, counter cleared (heap low water mark = %d Bytes / free heap = %d bytes)", \ + esp_get_minimum_free_heap_size(), ESP.getFreeHeap()); do_send(&sendjob); // send count reset_counters(); // clear macs container and reset all counters reset_salt(); // get new salt for salting hashes