merged changes
This commit is contained in:
@@ -210,6 +210,14 @@ void ws_client_stop(void)
|
||||
}
|
||||
}
|
||||
|
||||
void ws_client_reconnect(void)
|
||||
{
|
||||
if (!s_client) return;
|
||||
ESP_LOGI(TAG, "Manual WS reconnect triggered");
|
||||
esp_websocket_client_close(s_client, pdMS_TO_TICKS(2000));
|
||||
s_last_data_tick = xTaskGetTickCount();
|
||||
}
|
||||
|
||||
ws_state_t ws_client_get_state(void)
|
||||
{
|
||||
return s_state;
|
||||
|
||||
@@ -59,6 +59,7 @@ typedef void (*ws_state_callback_t)(ws_state_t state);
|
||||
void ws_client_init(const char *uri);
|
||||
void ws_client_start(void);
|
||||
void ws_client_stop(void);
|
||||
void ws_client_reconnect(void);
|
||||
ws_state_t ws_client_get_state(void);
|
||||
void ws_client_get_stats(pi_stats_t *out);
|
||||
void ws_client_set_data_callback(ws_data_callback_t cb);
|
||||
|
||||
Reference in New Issue
Block a user