Skip to content

Commit acace37

Browse files
committed
Merge branch 'bugfix/idf_build_failures' into 'master'
bugfix: Compilation fixes for different idf versions and targets See merge request app-frameworks/esp-rainmaker!306
2 parents b4db703 + cd12423 commit acace37

File tree

11 files changed

+30
-31
lines changed

11 files changed

+30
-31
lines changed

.github/workflows/upload_components.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

components/esp-insights

components/esp_rainmaker/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ set(core_srcs "src/core/esp_rmaker_core.c"
1212
"src/core/esp_rmaker_schedule.c"
1313
"src/core/esp_rmaker_scenes.c")
1414

15-
set(priv_req protobuf-c json_parser json_generator wifi_provisioning nvs_flash esp_http_client app_update esp-tls mbedtls esp_https_ota console esp_local_ctrl esp_https_server mdns esp_schedule)
16-
15+
set(priv_req protobuf-c json_parser json_generator wifi_provisioning nvs_flash esp_http_client app_update esp-tls mbedtls esp_https_ota console esp_local_ctrl esp_https_server mdns esp_schedule efuse)
1716

1817
if(CONFIG_ESP_RMAKER_ASSISTED_CLAIM)
1918
list(APPEND core_srcs

components/esp_rainmaker/src/ota/esp_rmaker_ota.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ esp_err_t esp_rmaker_ota_default_cb(esp_rmaker_ota_handle_t ota_handle, esp_rmak
161161
esp_err_t ota_finish_err = ESP_OK;
162162
esp_http_client_config_t config = {
163163
.url = ota_data->url,
164-
#ifdef CONFIG_ESP_RMAKER_USE_CERT_BUNDLE
164+
#ifdef ESP_RMAKER_USE_CERT_BUNDLE
165165
.crt_bundle_attach = esp_crt_bundle_attach,
166166
#else
167167
.cert_pem = ota_data->server_cert,

components/esp_schedule/src/esp_schedule_nvs.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,27 @@ esp_schedule_handle_t *esp_schedule_nvs_get_all(uint8_t *schedule_count)
227227
return NULL;
228228
}
229229
int handle_count = 0;
230+
230231
nvs_entry_info_t nvs_entry;
232+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
233+
nvs_iterator_t nvs_iterator = NULL;
234+
esp_err_t err = nvs_entry_find(esp_schedule_nvs_partition, ESP_SCHEDULE_NVS_NAMESPACE, NVS_TYPE_BLOB, &nvs_iterator);
235+
if (err != ESP_OK) {
236+
ESP_LOGE(TAG, "No entry found in NVS");
237+
return NULL;;
238+
}
239+
while (err == ESP_OK) {
240+
nvs_entry_info(nvs_iterator, &nvs_entry);
241+
ESP_LOGI(TAG, "Found schedule in NVS with key: %s", nvs_entry.key);
242+
handle_list[handle_count] = esp_schedule_nvs_get(nvs_entry.key);
243+
if (handle_list[handle_count] != NULL) {
244+
/* Increase count only if nvs_get was successful */
245+
handle_count++;
246+
}
247+
err = nvs_entry_next(&nvs_iterator);
248+
}
249+
nvs_release_iterator(nvs_iterator);
250+
#else
231251
nvs_iterator_t nvs_iterator = nvs_entry_find(esp_schedule_nvs_partition, ESP_SCHEDULE_NVS_NAMESPACE, NVS_TYPE_BLOB);
232252
if (nvs_iterator == NULL) {
233253
ESP_LOGE(TAG, "No entry found in NVS");
@@ -243,6 +263,7 @@ esp_schedule_handle_t *esp_schedule_nvs_get_all(uint8_t *schedule_count)
243263
}
244264
nvs_iterator = nvs_entry_next(nvs_iterator);
245265
}
266+
#endif
246267
*schedule_count = handle_count;
247268
ESP_LOGI(TAG, "Found %d schedules in NVS", *schedule_count);
248269
return handle_list;

examples/homekit_switch/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ else()
1313
endif(DEFINED ENV{RMAKER_PATH})
1414

1515
# Add RainMaker components and other common application components
16-
set(EXTRA_COMPONENT_DIRS $ENV{HOMEKIT_PATH}/components/homekit ${RMAKER_PATH}/components/esp-insights/components ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common)
16+
set(EXTRA_COMPONENT_DIRS $ENV{HOMEKIT_PATH}/components/homekit ${RMAKER_PATH}/components/esp-insights/components ${RMAKER_PATH}/components ${RMAKER_PATH}/examples/common components)
1717

1818
set(PROJECT_VER "1.0")
1919
include($ENV{IDF_PATH}/tools/cmake/project.cmake)

examples/homekit_switch/main/app_homekit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <freertos/FreeRTOS.h>
1212
#include <freertos/task.h>
1313
#include <esp_log.h>
14-
#include <esp_netif_types.h>
14+
#include <esp_netif.h>
1515
#include <esp_rmaker_core.h>
1616
#include <esp_rmaker_standard_params.h>
1717

examples/homekit_switch/main/app_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static esp_err_t write_cb(const esp_rmaker_device_t *device, const esp_rmaker_pa
4949
}
5050
/* Event handler for catching RainMaker events */
5151
static void event_handler(void* arg, esp_event_base_t event_base,
52-
int event_id, void* event_data)
52+
int32_t event_id, void* event_data)
5353
{
5454
if (event_base == RMAKER_EVENT) {
5555
switch (event_id) {

examples/multi_device/main/app_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static bool g_power_state = DEFAULT_SWITCH_POWER;
3737
static float g_temperature = DEFAULT_TEMPERATURE;
3838
static TimerHandle_t sensor_timer;
3939

40-
static void app_sensor_update(void *priv)
40+
static void app_sensor_update(TimerHandle_t handle)
4141
{
4242
static float delta = 0.5;
4343
g_temperature += delta;

0 commit comments

Comments
 (0)