Fit to ESP-IDF V5

This commit is contained in:
nopnop2002
2022-10-12 18:09:56 +09:00
parent 9e23587e80
commit 435965c61d
4 changed files with 14 additions and 8 deletions
+6 -6
View File
@@ -164,8 +164,8 @@ static esp_err_t twai_send_handler(httpd_req_t *req)
}
// Search data item
int16_t data_len;
char data_value[8];
int16_t data_len;
char data_value[8];
state = cJSON_GetObjectItem(root, "data");
if (state) {
cJSON *data_array = cJSON_GetObjectItem(root,"data");
@@ -267,19 +267,19 @@ esp_err_t start_server(const char *base_path, int port)
/* URI handler for getting system info */
httpd_uri_t system_info_get_uri = {
.uri = "/api/system/info",
.uri = "/api/system/info",
.method = HTTP_GET,
.handler = system_info_get_handler,
.user_ctx = rest_context
.user_ctx = rest_context
};
httpd_register_uri_handler(server, &system_info_get_uri);
/* URI handler for send twai */
httpd_uri_t twai_send_post_uri = {
.uri = "/api/twai/send",
.uri = "/api/twai/send",
.method = HTTP_POST,
.handler = twai_send_handler,
.user_ctx = rest_context
.user_ctx = rest_context
};
httpd_register_uri_handler(server, &twai_send_post_uri);
+6
View File
@@ -0,0 +1,6 @@
## IDF Component Manager Manifest File
dependencies:
espressif/mdns:
version: "^1.0.3"
rules:
- if: "idf_version >=5.0"
+1 -1
View File
@@ -65,7 +65,7 @@ static EventGroupHandle_t s_wifi_event_group;
* - we are connected to the AP with an IP
* - we failed to connect after the maximum amount of retries */
#define WIFI_CONNECTED_BIT BIT0
#define WIFI_FAIL_BIT BIT1
#define WIFI_FAIL_BIT BIT1
static int s_retry_num = 0;
+1 -1
View File
@@ -4,7 +4,7 @@
#define DATA_FRAME 0
#define REMOTE_FRAME 1
#define CMD_RECEIVE 100
#define CMD_RECEIVE 100
#define CMD_SEND 200
typedef struct {