forked from btclock/btclock_v3
Improved QR-code setup, added MCAP screen
This commit is contained in:
parent
f611d2f5f8
commit
705f27fda9
25 changed files with 1197 additions and 88 deletions
|
@ -2,10 +2,12 @@
|
|||
|
||||
char *wsServer;
|
||||
esp_websocket_client_handle_t blockNotifyClient = NULL;
|
||||
unsigned long int currentBlockHeight;
|
||||
unsigned long int currentBlockHeight = 816000;
|
||||
|
||||
void setupBlockNotify()
|
||||
{
|
||||
currentBlockHeight = preferences.getULong("blockHeight", 816000);
|
||||
|
||||
IPAddress result;
|
||||
|
||||
int dnsErr = -1;
|
||||
|
@ -87,7 +89,8 @@ void onWebsocketMessage(esp_websocket_event_data_t *event_data)
|
|||
|
||||
currentBlockHeight = block["height"].as<long>();
|
||||
|
||||
Serial.printf("New block found: %d\r\n", block["height"].as<long>());
|
||||
Serial.printf("New block found: %d\r\n", block["height"].as<long>());
|
||||
preferences.putULong("blockHeight", currentBlockHeight);
|
||||
|
||||
if (blockUpdateTaskHandle != nullptr) {
|
||||
xTaskNotifyGive(blockUpdateTaskHandle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue