Update: websocket optimization

- Use protobuf
 - Eliminate unnecessary optimization logic
 - UART, sensor, status data transmitted as pb data

Signed-off-by: YoungSoo Shin <shinys000114@gmail.com>
This commit is contained in:
2025-09-02 11:19:50 +09:00
parent a32f43ec35
commit ab04ff8413
12 changed files with 1197 additions and 256 deletions

View File

@@ -4,13 +4,15 @@
#ifndef ODROID_REMOTE_HTTP_WEBSERVER_H
#define ODROID_REMOTE_HTTP_WEBSERVER_H
#include "cJSON.h"
#include "esp_http_server.h"
#include <stddef.h>
#include <stdint.h>
void register_wifi_endpoint(httpd_handle_t server);
void register_ws_endpoint(httpd_handle_t server);
void register_control_endpoint(httpd_handle_t server);
void push_data_to_ws(cJSON* data);
void push_data_to_ws(const uint8_t* data, size_t len);
void register_reboot_endpoint(httpd_handle_t server);
esp_err_t change_baud_rate(int baud_rate);