From 957a947bc5e81565b9fb7fa422c347897ec7b50b Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Sat, 21 Dec 2024 17:53:35 +0100 Subject: [PATCH] More clean-up and bugfixes --- src/lib/bitaxe_fetch.cpp | 2 +- src/lib/button_handler.cpp | 1 - src/lib/epd.cpp | 19 ------------------- src/lib/epd.hpp | 1 - src/lib/mining_pool_stats_fetch.cpp | 2 +- 5 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/lib/bitaxe_fetch.cpp b/src/lib/bitaxe_fetch.cpp index cfb7635..71ab90e 100644 --- a/src/lib/bitaxe_fetch.cpp +++ b/src/lib/bitaxe_fetch.cpp @@ -54,7 +54,7 @@ void taskBitaxeFetch(void *pvParameters) void setupBitaxeFetchTask() { - xTaskCreate(taskBitaxeFetch, "bitaxeFetch", (6 * 1024), NULL, tskIDLE_PRIORITY, + xTaskCreate(taskBitaxeFetch, "bitaxeFetch", (3 * 1024), NULL, tskIDLE_PRIORITY, &bitaxeFetchTaskHandle); xTaskNotifyGive(bitaxeFetchTaskHandle); diff --git a/src/lib/button_handler.cpp b/src/lib/button_handler.cpp index c2f2a21..61e6c6d 100644 --- a/src/lib/button_handler.cpp +++ b/src/lib/button_handler.cpp @@ -78,5 +78,4 @@ void setupButtonTask() { &buttonTaskHandle); // Create the FreeRTOS task // Use interrupt instead of task attachInterrupt(MCP_INT_PIN, handleButtonInterrupt, CHANGE); - Serial.printf("Button task created\n"); } diff --git a/src/lib/epd.cpp b/src/lib/epd.cpp index 9b5bfd1..528db1d 100644 --- a/src/lib/epd.cpp +++ b/src/lib/epd.cpp @@ -149,25 +149,6 @@ void forceFullRefresh() } } -void refreshFromMemory() -{ - for (uint i = 0; i < NUM_SCREENS; i++) - { - int *taskParam = new int; - *taskParam = i; - - xTaskCreate( - [](void *pvParameters) - { - const int epdIndex = *(int *)pvParameters; - delete (int *)pvParameters; - displays[epdIndex].refresh(false); - vTaskDelete(NULL); - }, - "PrepareUpd", 4096, taskParam, tskIDLE_PRIORITY, NULL); - } -} - void setupDisplays() { std::lock_guard lockMcp(mcpMutex); diff --git a/src/lib/epd.hpp b/src/lib/epd.hpp index c267047..35fcdd3 100644 --- a/src/lib/epd.hpp +++ b/src/lib/epd.hpp @@ -26,7 +26,6 @@ typedef struct { } UpdateDisplayTaskItem; void forceFullRefresh(); -void refreshFromMemory(); void setupDisplays(); void splitText(const uint dispNum, const String &top, const String &bottom, diff --git a/src/lib/mining_pool_stats_fetch.cpp b/src/lib/mining_pool_stats_fetch.cpp index 3f870bb..b8fed5c 100644 --- a/src/lib/mining_pool_stats_fetch.cpp +++ b/src/lib/mining_pool_stats_fetch.cpp @@ -93,7 +93,7 @@ void setupMiningPoolStatsFetchTask() "logoDownload", (6 * 1024), NULL, - 12, + tskIDLE_PRIORITY, NULL); xTaskCreate(taskMiningPoolStatsFetch,