Change logs from informative to verbose
This commit is contained in:
@@ -47,19 +47,18 @@ static void i2c_read() {} //should read from i2c and if necessary call i2c_write
|
|||||||
static void i2c_write() {}
|
static void i2c_write() {}
|
||||||
|
|
||||||
void i2cTask(void *pvParameters) {
|
void i2cTask(void *pvParameters) {
|
||||||
ESP_LOGI(TAG, "Task started");
|
ESP_LOGV(TAG, "Task started");
|
||||||
i2c_init();
|
i2c_init();
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
// TODO: this should check for MQTT connection (which in turn checks for WI-FI)
|
ESP_LOGV(TAG, "Checking Wi-Fi connection...");
|
||||||
ESP_LOGI(TAG, "Checking Wi-Fi connection...");
|
|
||||||
//FIXME: change wifi_event_group to connectivity_event_group after merge with dev-esp32-mqtt branch
|
//FIXME: change wifi_event_group to connectivity_event_group after merge with dev-esp32-mqtt branch
|
||||||
xEventGroupWaitBits(wifi_event_group, WIFI_CONNECTED_BIT, pdFALSE, pdTRUE, portMAX_DELAY);
|
xEventGroupWaitBits(wifi_event_group, WIFI_CONNECTED_BIT, pdFALSE, pdTRUE, portMAX_DELAY);
|
||||||
|
|
||||||
if ((bits & (WIFI_CONNECTED_BIT | MQTT_CONNECTED_BIT)) == (WIFI_CONNECTED_BIT | MQTT_CONNECTED_BIT)) i2c_read();
|
if ((bits & (WIFI_CONNECTED_BIT | MQTT_CONNECTED_BIT)) == (WIFI_CONNECTED_BIT | MQTT_CONNECTED_BIT)) i2c_read();
|
||||||
|
|
||||||
ESP_ERROR_CHECK(esp_task_wdt_reset());
|
ESP_ERROR_CHECK(esp_task_wdt_reset());
|
||||||
ESP_LOGI(TAG, "Task reset");
|
ESP_LOGV(TAG, "Task reset");
|
||||||
vTaskDelay(pdMS_TO_TICKS(2000));
|
vTaskDelay(pdMS_TO_TICKS(2000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user