Skip to content

Commit

Permalink
Merge branch 'refactor/app_descriptor_dependency' into 'master'
Browse files Browse the repository at this point in the history
refactor: cleaner dependency of app descriptor

See merge request app-frameworks/esp-rainmaker!463
  • Loading branch information
mahavirj committed Aug 21, 2024
2 parents 19ab637 + 5f501ec commit 082f5e3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions components/esp_rainmaker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ set(priv_req protobuf-c json_parser json_generator
nvs_flash esp_http_client app_update esp-tls mbedtls esp_https_ota
console esp_local_ctrl esp_https_server mdns esp_schedule efuse driver rmaker_common)

if ("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.0")
list(APPEND priv_req esp_app_format)
endif()

if ("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.1")
# NAT64 and DNS64 features were introduced for openthread component in IDF v5.1
list(APPEND priv_req openthread network_provisioning)
Expand Down
10 changes: 5 additions & 5 deletions components/esp_rainmaker/src/core/esp_rmaker_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
// limitations under the License.
#include <sdkconfig.h>
#include <string.h>
#include <esp_wifi.h>
#include "esp_idf_version.h"
#include <esp_log.h>
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
#include <esp_app_desc.h>
#else
#include <esp_ota_ops.h>
#endif
#include <esp_rmaker_utils.h>
#include <esp_rmaker_core.h>
#include <esp_rmaker_secure_boot_digest.h>

#include "esp_rmaker_internal.h"

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
#include <esp_app_desc.h>
#endif

static const char *TAG = "esp_rmaker_node";

static void esp_rmaker_node_info_free(esp_rmaker_node_info_t *info)
Expand Down
3 changes: 2 additions & 1 deletion components/esp_rainmaker/src/core/esp_rmaker_node_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <sdkconfig.h>
#include <string.h>
#include <esp_log.h>
#include <esp_ota_ops.h>
#include <json_generator.h>
#include <esp_rmaker_core.h>
#include <esp_rmaker_utils.h>
Expand All @@ -25,6 +24,8 @@

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
#include <esp_app_desc.h>
#else
#include <esp_ota_ops.h>
#endif

#define NODE_CONFIG_TOPIC_SUFFIX "config"
Expand Down

0 comments on commit 082f5e3

Please sign in to comment.