forked from btclock/btclock_v3
Added EventSource for webUI updates, completed more features
This commit is contained in:
parent
91fd921e2e
commit
280764a2fa
16 changed files with 241 additions and 78 deletions
|
@ -32,7 +32,7 @@ void setupBlockNotify()
|
|||
{
|
||||
String blockHeightStr = http->getString();
|
||||
currentBlockHeight = blockHeightStr.toInt();
|
||||
xTaskNotifyGive(blockUpdateTaskHandle);
|
||||
// xTaskNotifyGive(blockUpdateTaskHandle);
|
||||
}
|
||||
|
||||
// std::strcpy(wsServer, String("wss://" + mempoolInstance + "/api/v1/ws").c_str());
|
||||
|
@ -95,7 +95,10 @@ void onWebsocketMessage(esp_websocket_event_data_t *event_data)
|
|||
|
||||
if (blockUpdateTaskHandle != nullptr) {
|
||||
xTaskNotifyGive(blockUpdateTaskHandle);
|
||||
queueLedEffect(LED_FLASH_BLOCK_NOTIFY);
|
||||
if (preferences.getBool("ledFlashOnUpd", false)) {
|
||||
vTaskDelay(pdMS_TO_TICKS(250)); // Wait until screens are updated
|
||||
queueLedEffect(LED_FLASH_BLOCK_NOTIFY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue