optimize ESP Insights handling
Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "common.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "esp_err.h"
|
||||
#include "esp_insights.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_mac.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
@@ -35,7 +36,7 @@ static void button_event_cb(void *arg, void *usr_data)
|
||||
button_user_data_t *data = (button_user_data_t *)usr_data;
|
||||
uint8_t gpio_num = data->gpio;
|
||||
|
||||
ESP_LOGI(TAG, "Button pressed on GPIO %d", gpio_num);
|
||||
ESP_DIAG_EVENT(TAG, "Button pressed on GPIO %d", gpio_num);
|
||||
|
||||
if (xQueueSend(buttonQueue, &gpio_num, 0) != pdTRUE)
|
||||
{
|
||||
@@ -71,7 +72,7 @@ void setup_buttons(void)
|
||||
return;
|
||||
}
|
||||
|
||||
ESP_LOGI(TAG, "Button queue created successfully");
|
||||
ESP_DIAG_EVENT(TAG, "Button queue created successfully");
|
||||
for (int i = 0; i < sizeof(gpios) / sizeof(gpios[0]); i++)
|
||||
{
|
||||
init_button(gpios[i], i);
|
||||
|
Reference in New Issue
Block a user