Skip to content

Commit 1e2ee37

Browse files
authored
Fixes Rainmaker to be a Managed Component (#8842)
* Uses IDF Managed Components This changes is targeted to be used within Arduino Lib Builder and with projects that use Arduino as IDF Component. * Fixes RainMaker QR code Fixes RainMaker in order to use it as Managed Component and with the latest RainMaker release. * Removes Camera Component * SR Component only needed for the S3
1 parent e382b6a commit 1e2ee37

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

Diff for: CMakeLists.txt

-12
Original file line numberDiff line numberDiff line change
@@ -254,21 +254,9 @@ function(maybe_add_component component_name)
254254
endif()
255255
endfunction()
256256

257-
maybe_add_component(esp-dsp)
258-
259-
if(CONFIG_ESP_INSIGHTS_ENABLED)
260-
maybe_add_component(esp_insights)
261-
endif()
262-
if(CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK)
263-
maybe_add_component(esp_rainmaker)
264-
maybe_add_component(qrcode)
265-
endif()
266257
if(IDF_TARGET MATCHES "esp32s2|esp32s3" AND CONFIG_TINYUSB_ENABLED)
267258
maybe_add_component(arduino_tinyusb)
268259
endif()
269260
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_ArduinoOTA)
270261
maybe_add_component(esp_https_ota)
271262
endif()
272-
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_LITTLEFS)
273-
maybe_add_component(esp_littlefs)
274-
endif()

Diff for: idf_component.yml

+11
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,14 @@ dependencies:
2727
idf: ">=5.1"
2828
mdns: "^1.1.0"
2929
chmorgan/esp-libhelix-mp3: "1.0.3"
30+
esp-dsp: "^1.3.4"
31+
espressif/esp_rainmaker: "^1.0.0"
32+
espressif/rmaker_common: "^1.4.3"
33+
espressif/esp_insights: "^1.0.1"
34+
espressif/qrcode: "^0.1.0~1"
35+
joltwallet/littlefs: "^1.10.2"
36+
espressif/esp-sr:
37+
version: "^1.4.2"
38+
rules:
39+
- if: "target in [esp32s3]"
40+

Diff for: libraries/RainMaker/src/RMakerQR.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ void printQR(const char *name, const char *pop, const char *transport)
66
log_w("Cannot generate QR code payload. Data missing.");
77
return;
88
}
9-
char payload[150];
9+
char payload[150] = {0};
1010
snprintf(payload, sizeof(payload), "{\"ver\":\"%s\",\"name\":\"%s\"" \
1111
",\"pop\":\"%s\",\"transport\":\"%s\"}",
1212
PROV_QR_VERSION, name, pop, transport);
1313
if(Serial){
1414
Serial.printf("Scan this QR code from the ESP RainMaker phone app.\n");
1515
}
16-
qrcode_display(payload);
16+
//qrcode_display(payload); // deprecated!
17+
esp_qrcode_config_t cfg = ESP_QRCODE_CONFIG_DEFAULT();
18+
esp_qrcode_generate(&cfg, payload);
1719
if(Serial){
1820
Serial.printf("If QR code is not visible, copy paste the below URL in a browser.\n%s?data=%s\n", QRCODE_BASE_URL, payload);
1921
}

0 commit comments

Comments
 (0)