More clean-up and bugfixes

This commit is contained in:
Djuri Baars 2024-12-21 17:53:35 +01:00
parent c44626cb42
commit 957a947bc5
5 changed files with 2 additions and 23 deletions

View file

@ -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);

View file

@ -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");
}

View file

@ -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<std::mutex> lockMcp(mcpMutex);

View file

@ -26,7 +26,6 @@ typedef struct {
} UpdateDisplayTaskItem;
void forceFullRefresh();
void refreshFromMemory();
void setupDisplays();
void splitText(const uint dispNum, const String &top, const String &bottom,

View file

@ -93,7 +93,7 @@ void setupMiningPoolStatsFetchTask()
"logoDownload",
(6 * 1024),
NULL,
12,
tskIDLE_PRIORITY,
NULL);
xTaskCreate(taskMiningPoolStatsFetch,