Improved QR-code setup, added MCAP screen

This commit is contained in:
Djuri 2023-11-10 19:52:06 +01:00
parent f611d2f5f8
commit 705f27fda9
25 changed files with 1197 additions and 88 deletions

View file

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