2023-11-07 00:11:12 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Arduino.h>
|
|
|
|
#include <ArduinoJson.h>
|
2023-11-30 21:38:01 +00:00
|
|
|
#include <string>
|
2023-11-07 00:11:12 +00:00
|
|
|
|
2023-11-30 21:38:01 +00:00
|
|
|
#include <esp_websocket_client.h>
|
|
|
|
#include "lib/screen_handler.hpp"
|
2023-11-07 00:11:12 +00:00
|
|
|
|
2023-11-30 21:38:01 +00:00
|
|
|
// using namespace websockets;
|
2023-11-07 00:11:12 +00:00
|
|
|
|
|
|
|
void setupPriceNotify();
|
|
|
|
|
2023-11-30 21:38:01 +00:00
|
|
|
void onWebsocketPriceEvent(void *handler_args, esp_event_base_t base,
|
|
|
|
int32_t event_id, void *event_data);
|
|
|
|
void onWebsocketPriceMessage(esp_websocket_event_data_t *event_data);
|
2023-11-07 00:11:12 +00:00
|
|
|
|
2023-11-12 11:38:28 +00:00
|
|
|
uint getPrice();
|
|
|
|
void setPrice(uint newPrice);
|
|
|
|
|
2023-11-10 22:18:14 +00:00
|
|
|
bool isPriceNotifyConnected();
|
|
|
|
void stopPriceNotify();
|