Skip to content

Fixes Rainmaker to be a Managed Component #8842

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,21 +254,9 @@ function(maybe_add_component component_name)
endif()
endfunction()

maybe_add_component(esp-dsp)

if(CONFIG_ESP_INSIGHTS_ENABLED)
maybe_add_component(esp_insights)
endif()
if(CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK)
maybe_add_component(esp_rainmaker)
maybe_add_component(qrcode)
endif()
if(IDF_TARGET MATCHES "esp32s2|esp32s3" AND CONFIG_TINYUSB_ENABLED)
maybe_add_component(arduino_tinyusb)
endif()
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_ArduinoOTA)
maybe_add_component(esp_https_ota)
endif()
if(NOT CONFIG_ARDUINO_SELECTIVE_COMPILATION OR CONFIG_ARDUINO_SELECTIVE_LITTLEFS)
maybe_add_component(esp_littlefs)
endif()
12 changes: 12 additions & 0 deletions idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,15 @@ dependencies:
idf: ">=5.1"
mdns: "^1.1.0"
chmorgan/esp-libhelix-mp3: "1.0.3"
esp-dsp: "^1.3.4"
espressif/esp_rainmaker: "^1.0.0"
espressif/rmaker_common: "^1.4.3"
espressif/esp_insights: "^1.0.1"
espressif/qrcode: "^0.1.0~1"
espressif/esp32-camera: "^2.0.5"
joltwallet/littlefs: "^1.10.2"
espressif/esp-sr:
version: "^1.4.2"
rules:
- if: "target in [esp32, esp32s3]"

6 changes: 4 additions & 2 deletions libraries/RainMaker/src/RMakerQR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ void printQR(const char *name, const char *pop, const char *transport)
log_w("Cannot generate QR code payload. Data missing.");
return;
}
char payload[150];
char payload[150] = {0};
snprintf(payload, sizeof(payload), "{\"ver\":\"%s\",\"name\":\"%s\"" \
",\"pop\":\"%s\",\"transport\":\"%s\"}",
PROV_QR_VERSION, name, pop, transport);
if(Serial){
Serial.printf("Scan this QR code from the ESP RainMaker phone app.\n");
}
qrcode_display(payload);
//qrcode_display(payload); // deprecated!
esp_qrcode_config_t cfg = ESP_QRCODE_CONFIG_DEFAULT();
esp_qrcode_generate(&cfg, payload);
if(Serial){
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);
}
Expand Down