diff --git a/esp32_device/main/main.c b/esp32_device/main/main.c index 4ca3965..d1f89d4 100755 --- a/esp32_device/main/main.c +++ b/esp32_device/main/main.c @@ -176,7 +176,7 @@ void app_main(void) if (!res) { fails += 1; - ESP_LOGE(TAG, "Failed to synchronise device!"); + ESP_LOGE(TAG, "Failed to synchronise device! (number=%d)", fails); // Safely turn off all relays after a given number of failures if (fails > 5) @@ -197,6 +197,8 @@ void app_main(void) continue; } + fails = 0; + // TODO : apply sync sync_response_print(res);