From 94c39eaf0da5f606391c8d01e42dcae5d74201f6 Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Sun, 27 Dec 2020 21:10:38 +0100 Subject: [PATCH] Don't catch up with missed intervals --- operame.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operame.ino b/operame.ino index 6c9a2b1..ba35100 100644 --- a/operame.ino +++ b/operame.ino @@ -390,7 +390,7 @@ void setup() { if (ota_enabled) setup_ota(); } -#define every(t) for (static uint16_t _lasttime; (uint16_t)((uint16_t)millis() - _lasttime) >= (t); _lasttime += (t)) +#define every(t) for (static uint16_t _lasttime; (uint16_t)((uint16_t)millis() - _lasttime) >= (t); _lasttime = millis()) void loop() { static int co2;