From d2eea406416a4b0fde560bfeb10ed1aa6aebca47 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 4 Jul 2022 16:26:45 +0100 Subject: [PATCH] Revert "bugfix: variable name shadowing" This reverts commit a6dc9699d28473c4ccae8a9fa9de9d9d7506cfff. --- autoplant_pio/src/autoplant.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoplant_pio/src/autoplant.cpp b/autoplant_pio/src/autoplant.cpp index 79ac15e..9774627 100644 --- a/autoplant_pio/src/autoplant.cpp +++ b/autoplant_pio/src/autoplant.cpp @@ -103,7 +103,7 @@ void connect_wifi() { * @return void */ void connect_mqtt() { - int backoff_delay = 1000; + int delay = 1000; while(true) { Serial.print("MQTT: "); mqtt = PubSubClient(); @@ -142,9 +142,9 @@ void connect_mqtt() { int error_code = mqtt.state(); Serial.println("failed, error code "+String(error_code)); - delay(backoff_delay); - backoff_delay += 1000; - if(backoff_delay > 60 * 1000) backoff_delay = 60 * 1000; + delay(delay); + delay += 1000; + if(delay > 60 * 1000) delay = 60 * 1000; } Serial.println("ok");