Skip to content

Commit f2a0e02

Browse files
committed
example: add provisioning controller demo
1 parent 8ef8aef commit f2a0e02

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+746
-83
lines changed

.gitlab-ci.yml

+13-8
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,13 @@ default:
3939
- idf.py build
4040
- cd -
4141

42-
.build_rainmaker_led_light_example: &build_rainmaker_led_light_example
43-
- cd examples/rainmaker_led_light
42+
.build_rainmaker_example: &build_rainmaker_example
43+
- cd examples/rainmaker/led_light
44+
- rm -rf build sdkconfig
45+
- idf.py set-target ${idf_target}
46+
- idf.py build
47+
- cd -
48+
- cd examples/rainmaker/provisioning_controller
4449
- rm -rf build sdkconfig
4550
- idf.py set-target ${idf_target}
4651
- idf.py build
@@ -79,7 +84,7 @@ esp32_v4.4_build:
7984

8085
script:
8186
- *build_mesh_local_control_example
82-
- *build_rainmaker_led_light_example
87+
- *build_rainmaker_example
8388

8489
esp32_v5.0_build:
8590
stage: build
@@ -97,7 +102,7 @@ esp32_v5.0_build:
97102

98103
script:
99104
- *build_mesh_local_control_example
100-
- *build_rainmaker_led_light_example
105+
- *build_rainmaker_example
101106

102107
esp32c3_v4.3_build:
103108
stage: build
@@ -132,7 +137,7 @@ esp32c3_v4.4_build:
132137

133138
script:
134139
- *build_mesh_local_control_example
135-
- *build_rainmaker_led_light_example
140+
- *build_rainmaker_example
136141

137142
esp32c3_v5.0_build:
138143
stage: build
@@ -150,7 +155,7 @@ esp32c3_v5.0_build:
150155

151156
script:
152157
- *build_mesh_local_control_example
153-
- *build_rainmaker_led_light_example
158+
- *build_rainmaker_example
154159

155160
esp32s2_v4.3_build:
156161
stage: build
@@ -219,7 +224,7 @@ esp32s3_v4.4_build:
219224

220225
script:
221226
- *build_mesh_local_control_example
222-
- *build_rainmaker_led_light_example
227+
- *build_rainmaker_example
223228

224229
esp32s3_v5.0_build:
225230
stage: build
@@ -237,7 +242,7 @@ esp32s3_v5.0_build:
237242

238243
script:
239244
- *build_mesh_local_control_example
240-
- *build_rainmaker_led_light_example
245+
- *build_rainmaker_example
241246

242247
push_master_to_github:
243248
stage: deploy

README.md

+1-1

README_CN.md

+1-1

components/mesh_lite/CHANGELOG.md

+1-1

components/mesh_lite/CHANGELOG_CN.md

+1-1

components/mesh_lite/User_Guide.md

+1-1

components/mesh_lite/User_Guide_CN.md

+1-1

components/mesh_lite/idf_component.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ dependencies:
1010
espressif/cmake_utilities: 0.*
1111
examples:
1212
- path: ../../examples/mesh_local_control
13-
- path: ../../examples/rainmaker_led_light
13+
- path: ../../examples/rainmaker/led_light

examples/rainmaker_led_light/README.md examples/rainmaker/led_light/README.md

+15-15

examples/rainmaker_led_light/README_CN.md examples/rainmaker/led_light/README_CN.md

+15-15

examples/rainmaker_led_light/components/app_bridge/app_mesh_lite_comm.c examples/rainmaker/led_light/components/app_bridge/app_mesh_lite_comm.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static const esp_mesh_lite_msg_action_t report_child_info_action[] = {
130130
{NULL, NULL, NULL} /* Must be NULL terminated */
131131
};
132132

133-
static void root_timer_cb(void* param)
133+
static void root_timer_cb(TimerHandle_t timer)
134134
{
135135
if (esp_mesh_lite_get_level() > ROOT) {
136136
return;
@@ -167,7 +167,7 @@ static void root_timer_cb(void* param)
167167
xSemaphoreGive(report_child_info_mutex);
168168
}
169169

170-
static void report_timer_cb(void* param)
170+
static void report_timer_cb(TimerHandle_t timer)
171171
{
172172
if (esp_mesh_lite_get_level() > ROOT) {
173173
app_rmaker_mesh_lite_report_child_info();

examples/rainmaker_led_light/components/app_rainmaker/app_rainmaker.c examples/rainmaker/led_light/components/app_rainmaker/app_rainmaker.c

+10-5
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@
77
#include <string.h>
88
#include <esp_log.h>
99
#include <esp_rmaker_standard_params.h>
10+
#include <app_insights.h>
1011
#include <esp_rmaker_ota.h>
12+
#include <esp_rmaker_mqtt.h>
13+
#include <esp_rmaker_schedule.h>
1114
#include <esp_rmaker_common_events.h>
12-
15+
#include <esp_rmaker_standard_devices.h>
1316
#include <cJSON.h>
14-
#include <app_light.h>
15-
#include <app_rainmaker_ota.h>
17+
18+
#include "app_light.h"
19+
#include "app_rainmaker_ota.h"
20+
#include "esp_mesh_lite.h"
1621

1722
static const char *TAG = "app_rainmaker";
1823

@@ -75,7 +80,7 @@ static void event_handler(void* arg, esp_event_base_t event_base,
7580
ESP_LOGI(TAG, "RainMaker Claim Failed.");
7681
break;
7782
default:
78-
ESP_LOGW(TAG, "Unhandled RainMaker Event: %d", event_id);
83+
ESP_LOGW(TAG, "Unhandled RainMaker Event: %"PRId32"", event_id);
7984
}
8085
} else if (event_base == RMAKER_COMMON_EVENT) {
8186
switch (event_id) {
@@ -114,7 +119,7 @@ static void event_handler(void* arg, esp_event_base_t event_base,
114119
esp_mesh_lite_erase_rtc_store();
115120
break;
116121
default:
117-
ESP_LOGW(TAG, "Unhandled RainMaker Common Event: %d", event_id);
122+
ESP_LOGW(TAG, "Unhandled RainMaker Common Event: %"PRId32"", event_id);
118123
}
119124
} else {
120125
ESP_LOGW(TAG, "Invalid event received!");

examples/rainmaker_led_light/components/app_rainmaker/app_rainmaker_ota.c examples/rainmaker/led_light/components/app_rainmaker/app_rainmaker_ota.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <esp_wifi.h>
99
#include <esp_rmaker_standard_params.h>
1010
#include <esp_rmaker_ota.h>
11-
11+
#include <esp_rmaker_utils.h>
1212
#include <app_rainmaker_ota.h>
1313

1414
static const char *TAG = "app_rainmaker_ota";

0 commit comments

Comments
 (0)