Finish V2 MsgPack WebSocket API implementation
This commit is contained in:
parent
c276d32807
commit
849e5ce439
5 changed files with 9 additions and 8 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
char *wsServer;
|
||||
esp_websocket_client_handle_t blockNotifyClient = NULL;
|
||||
uint currentBlockHeight = 840000;
|
||||
uint currentBlockHeight = 860000;
|
||||
uint blockMedianFee = 1;
|
||||
bool blockNotifyInit = false;
|
||||
unsigned long int lastBlockUpdate;
|
||||
|
|
|
@ -8,14 +8,13 @@ TaskHandle_t workerTaskHandle;
|
|||
esp_timer_handle_t screenRotateTimer;
|
||||
esp_timer_handle_t minuteTimer;
|
||||
|
||||
std::array<std::string, NUM_SCREENS> taskEpdContent = {"", "", "", "",
|
||||
"", "", ""};
|
||||
std::array<std::string, NUM_SCREENS> taskEpdContent = {};
|
||||
std::string priceString;
|
||||
|
||||
#define WORK_QUEUE_SIZE 10
|
||||
QueueHandle_t workQueue = NULL;
|
||||
|
||||
uint currentScreen;
|
||||
uint currentScreen = SCREEN_BLOCK_HEIGHT;
|
||||
uint currentCurrency = CURRENCY_USD;
|
||||
|
||||
void workerTask(void *pvParameters) {
|
||||
|
@ -158,7 +157,9 @@ void setupTasks() {
|
|||
&taskScreenRotateTaskHandle);
|
||||
|
||||
waitUntilNoneBusy();
|
||||
setCurrentScreen(preferences.getUInt("currentScreen", DEFAULT_CURRENT_SCREEN));
|
||||
|
||||
if (findScreenIndexByValue(preferences.getUInt("currentScreen", DEFAULT_CURRENT_SCREEN)) != -1)
|
||||
setCurrentScreen(preferences.getUInt("currentScreen", DEFAULT_CURRENT_SCREEN));
|
||||
}
|
||||
|
||||
void setupTimeUpdateTimer(void *pvParameters) {
|
||||
|
|
|
@ -15,7 +15,7 @@ void setupV2Notify()
|
|||
webSocket.onEvent(onWebsocketV2Event);
|
||||
webSocket.setReconnectInterval(5000);
|
||||
webSocket.enableHeartbeat(15000, 3000, 2);
|
||||
|
||||
|
||||
setupV2NotifyTask();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue