Просмотр исходного кода

esp_local_ctrl: Fix header inclusion
- Included `sdkconfig.h` and HTTP/S server based headers
explicitly

Laukik Hase 3 лет назад
Родитель
Сommit
e7efda4709

+ 6 - 0
components/esp_local_ctrl/include/esp_local_ctrl.h

@@ -10,6 +10,12 @@
 extern "C" {
 #endif
 
+#include <sdkconfig.h>
+#ifdef CONFIG_ESP_HTTPS_SERVER_ENABLE
+#include <esp_https_server.h>
+#else
+#include <esp_http_server.h>
+#endif
 #include <protocomm.h>
 
 /**

+ 1 - 5
examples/protocols/esp_local_ctrl/main/esp_local_ctrl_service.c

@@ -20,11 +20,7 @@
 #include <esp_log.h>
 #include <esp_timer.h>
 #include <esp_local_ctrl.h>
-#ifdef CONFIG_ESP_HTTPS_SERVER_ENABLE
-#include <esp_https_server.h>
-#else
-#include <esp_http_server.h>
-#endif
+
 static const char *TAG = "control";
 
 #define SERVICE_NAME "my_esp_ctrl_device"