Skip to content

Commit

Permalink
Fix device metadata getting sent multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
vikramdattu committed Oct 16, 2024
1 parent 6e3bca5 commit 72e2075
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/esp_insights/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "1.2.0"
version: "1.2.1"
description: Firmware agent for ESP Insights, which is a remote diagnostics solution to monitor the health of ESP devices in the field.
url: https://github.com/espressif/esp-insights/tree/main/components/esp_insights
repository: https://github.com/espressif/esp-insights.git
Expand Down
3 changes: 1 addition & 2 deletions components/esp_insights/src/esp_insights.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,15 +398,14 @@ static void send_insights_config(void)
/* Returns true if ESP Insights metadata CRC is changed */
static bool insights_meta_changed(void)
{
return true;
uint32_t nvs_crc;
uint32_t meta_crc = esp_diag_meta_crc_get();
esp_err_t err = esp_insights_meta_nvs_crc_get(&nvs_crc);
if (err == ESP_OK && nvs_crc == meta_crc) {
/* crc found and matched, no need to send insights meta */
return false;
}
ESP_LOGI(TAG, "Insights metrics metadata changed");
ESP_LOGI(TAG, "Insights metadata changed");
s_insights_data.meta_crc = meta_crc;
return true;
}
Expand Down

0 comments on commit 72e2075

Please sign in to comment.