forked from btclock/btclock_v3
More clean-up and bugfixes
This commit is contained in:
parent
c44626cb42
commit
957a947bc5
5 changed files with 2 additions and 23 deletions
|
@ -54,7 +54,7 @@ void taskBitaxeFetch(void *pvParameters)
|
||||||
|
|
||||||
void setupBitaxeFetchTask()
|
void setupBitaxeFetchTask()
|
||||||
{
|
{
|
||||||
xTaskCreate(taskBitaxeFetch, "bitaxeFetch", (6 * 1024), NULL, tskIDLE_PRIORITY,
|
xTaskCreate(taskBitaxeFetch, "bitaxeFetch", (3 * 1024), NULL, tskIDLE_PRIORITY,
|
||||||
&bitaxeFetchTaskHandle);
|
&bitaxeFetchTaskHandle);
|
||||||
|
|
||||||
xTaskNotifyGive(bitaxeFetchTaskHandle);
|
xTaskNotifyGive(bitaxeFetchTaskHandle);
|
||||||
|
|
|
@ -78,5 +78,4 @@ void setupButtonTask() {
|
||||||
&buttonTaskHandle); // Create the FreeRTOS task
|
&buttonTaskHandle); // Create the FreeRTOS task
|
||||||
// Use interrupt instead of task
|
// Use interrupt instead of task
|
||||||
attachInterrupt(MCP_INT_PIN, handleButtonInterrupt, CHANGE);
|
attachInterrupt(MCP_INT_PIN, handleButtonInterrupt, CHANGE);
|
||||||
Serial.printf("Button task created\n");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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()
|
void setupDisplays()
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lockMcp(mcpMutex);
|
std::lock_guard<std::mutex> lockMcp(mcpMutex);
|
||||||
|
|
|
@ -26,7 +26,6 @@ typedef struct {
|
||||||
} UpdateDisplayTaskItem;
|
} UpdateDisplayTaskItem;
|
||||||
|
|
||||||
void forceFullRefresh();
|
void forceFullRefresh();
|
||||||
void refreshFromMemory();
|
|
||||||
void setupDisplays();
|
void setupDisplays();
|
||||||
|
|
||||||
void splitText(const uint dispNum, const String &top, const String &bottom,
|
void splitText(const uint dispNum, const String &top, const String &bottom,
|
||||||
|
|
|
@ -93,7 +93,7 @@ void setupMiningPoolStatsFetchTask()
|
||||||
"logoDownload",
|
"logoDownload",
|
||||||
(6 * 1024),
|
(6 * 1024),
|
||||||
NULL,
|
NULL,
|
||||||
12,
|
tskIDLE_PRIORITY,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
xTaskCreate(taskMiningPoolStatsFetch,
|
xTaskCreate(taskMiningPoolStatsFetch,
|
||||||
|
|
Loading…
Reference in a new issue