Skip to content

Commit 723f4b9

Browse files
committed
Merge branch 'support/http_tport_evt' into 'main'
Raise insights transport event from http_transport See merge request app-frameworks/esp-insights!159
2 parents d082711 + 8946475 commit 723f4b9

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

components/esp_diag_data_store/idf_component.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.0.0"
1+
version: "1.0.1"
22
description: Simple APIs to use ESP Diagnostics data storage
33
url: https://github.com/espressif/esp-insights/tree/main/components/esp_diag_data_store
44
repository: https://github.com/espressif/esp-insights.git

components/esp_diagnostics/idf_component.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.0.0"
1+
version: "1.0.1"
22
description: Diagnostics component used in ESP Insights, which is a remote diagnostics solution to monitor the health of ESP devices in the field.
33
url: https://github.com/espressif/esp-insights/tree/main/components/esp_diagnostics
44
repository: https://github.com/espressif/esp-insights.git

components/esp_insights/idf_component.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "1.0.0"
1+
version: "1.0.1"
22
description: Firmware agent for ESP Insights, which is a remote diagnostics solution to monitor the health of ESP devices in the field.
33
url: https://github.com/espressif/esp-insights/tree/main/components/esp_insights
44
repository: https://github.com/espressif/esp-insights.git

components/esp_insights/src/transport/esp_insights_https.c

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <string.h>
1616
#include <esp_err.h>
1717
#include <esp_log.h>
18+
#include <esp_event.h>
1819
#include <esp_http_client.h>
1920
#include <esp_insights.h>
2021
#include <esp_insights_internal.h>
@@ -138,6 +139,11 @@ static int esp_insights_https_data_send(void *data, size_t len)
138139
ESP_LOGE(TAG, "API response status = %d", status);
139140
}
140141
}
142+
if (msg_id == 0) {
143+
esp_event_post(INSIGHTS_EVENT, INSIGHTS_EVENT_TRANSPORT_SEND_SUCCESS, NULL, 0, portMAX_DELAY);
144+
} else {
145+
esp_event_post(INSIGHTS_EVENT, INSIGHTS_EVENT_TRANSPORT_SEND_FAILED, NULL, 0, portMAX_DELAY);
146+
}
141147
cleanup:
142148
esp_http_client_cleanup(client);
143149
return msg_id;

0 commit comments

Comments
 (0)