diff --git a/main/http_server.c b/main/http_server.c index 3b188b4..403945d 100644 --- a/main/http_server.c +++ b/main/http_server.c @@ -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); diff --git a/main/idf_component.yml b/main/idf_component.yml new file mode 100644 index 0000000..dd31aa4 --- /dev/null +++ b/main/idf_component.yml @@ -0,0 +1,6 @@ +## IDF Component Manager Manifest File +dependencies: + espressif/mdns: + version: "^1.0.3" + rules: + - if: "idf_version >=5.0" diff --git a/main/main.c b/main/main.c index 2df276b..6d49843 100644 --- a/main/main.c +++ b/main/main.c @@ -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; diff --git a/main/twai.h b/main/twai.h index e58b4de..d656093 100644 --- a/main/twai.h +++ b/main/twai.h @@ -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 {