From 884ac8731445e09af8e558bee5f819f7b2f58e79 Mon Sep 17 00:00:00 2001 From: Michael Ehrenreich Date: Thu, 19 May 2022 18:21:08 +0200 Subject: [PATCH] Fix mick mode --- main/modes/mickmode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/modes/mickmode.cpp b/main/modes/mickmode.cpp index c1b9b64..4e47f0c 100644 --- a/main/modes/mickmode.cpp +++ b/main/modes/mickmode.cpp @@ -36,9 +36,9 @@ void MickMode::update() else { auto now = espchrono::millis_clock::now(); - auto timeDelta = std::chrono::floor(now - lastUpdate_).count(); + float timeDelta = std::chrono::floor(now - lastUpdate_).count(); // Make sure timeDelta can never be negative, otherwise the exponential below may explode - timeDelta = std::max(timeDelta, 0ll); + timeDelta = std::max(timeDelta, 0.f); lastUpdate_ = now; float alpha = 1.f - expf(-timeDelta / profileSettings.mickMode.smoothing);