@@ -2,7 +2,5 @@
# INCLUDE_DIRS "."
# )
-set(COMPONENT_SRCDIRS ".")
-set(COMPONENT_ADD_INCLUDEDIRS ".")
-
-register_component()
+idf_component_register(SRCS "main.c" "mqtt.c" "readTemps.c" "wifi.c"
+ INCLUDE_DIRS ".")
@@ -9,6 +9,7 @@
#include "wifi.h"
#include "mqtt.h"
#include "readTemps.h"
+#include "esp_chip_info.h"
esp_chip_info_t chip_info;
@@ -12,7 +12,11 @@
#include <stddef.h>
#include <string.h>
#include "esp_wifi.h"
+#if ESP_IDF_VERSION_MAJOR >= 5
+#else
#include "esp_system.h"
+#endif
#include "nvs_flash.h"
#include "esp_event.h"
#include "esp_netif.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
#include "esp_log.h"
#include "driver/gpio.h"