mirror of
https://github.com/btclock/btclock_v3.git
synced 2024-11-19 04:10:01 +01:00
Mark initial display init explicit
This commit is contained in:
parent
a11e275ce1
commit
279e156dc1
@ -78,11 +78,28 @@ 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()
|
||||||
{
|
{
|
||||||
for (uint i = 0; i < NUM_SCREENS; i++)
|
for (uint i = 0; i < NUM_SCREENS; i++)
|
||||||
{
|
{
|
||||||
displays[i].init();
|
displays[i].init(0, true, 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateQueue = xQueueCreate(UPDATE_QUEUE_SIZE, sizeof(UpdateDisplayTaskItem));
|
updateQueue = xQueueCreate(UPDATE_QUEUE_SIZE, sizeof(UpdateDisplayTaskItem));
|
||||||
@ -144,7 +161,7 @@ void prepareDisplayUpdateTask(void *pvParameters)
|
|||||||
{
|
{
|
||||||
uint epdIndex = receivedItem.dispNum;
|
uint epdIndex = receivedItem.dispNum;
|
||||||
|
|
||||||
displays[epdIndex].init(0, false); // Little longer reset duration because of MCP
|
// displays[epdIndex].init(0, false); // Little longer reset duration because of MCP
|
||||||
|
|
||||||
bool updatePartial = true;
|
bool updatePartial = true;
|
||||||
|
|
||||||
@ -389,7 +406,7 @@ void waitUntilNoneBusy()
|
|||||||
vTaskDelay(10);
|
vTaskDelay(10);
|
||||||
if (count == 200)
|
if (count == 200)
|
||||||
{
|
{
|
||||||
//displays[i].init(0, false);
|
// displays[i].init(0, false);
|
||||||
vTaskDelay(100);
|
vTaskDelay(100);
|
||||||
}
|
}
|
||||||
else if (count > 205)
|
else if (count > 205)
|
||||||
|
@ -22,6 +22,7 @@ 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, bool partial);
|
void splitText(const uint dispNum, const String& top, const String& bottom, bool partial);
|
||||||
|
Loading…
Reference in New Issue
Block a user