From 3da6ae2e7ee622e03d8ab83013e5587161b1cc9f Mon Sep 17 00:00:00 2001 From: Lixie Labs <5051485+connornishijima@users.noreply.github.com> Date: Fri, 10 May 2024 13:51:29 -0600 Subject: [PATCH] Mitigated apply_background() slowdown --- src/leds.h | 8 ++++---- src/profiler.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/leds.h b/src/leds.h index 58bf017..850044d 100644 --- a/src/leds.h +++ b/src/leds.h @@ -216,7 +216,7 @@ CRGBF desaturate(struct CRGBF input_color, float amount) { CRGBF hsv(float h, float s, float v) { CRGBF return_val; - profile_function([&]() { + //profile_function([&]() { // Normalize hue to range [0, 1] h = fmodf(h, 1.0f); if (h < 0.0f) h += 1.0f; @@ -241,7 +241,7 @@ CRGBF hsv(float h, float s, float v) { r += m; g += m; b += m; return_val = (CRGBF){r, g, b}; - }, __func__); + //}, __func__); return return_val; } @@ -633,7 +633,7 @@ void apply_brightness() { float get_color_range_hue(float progress){ float return_val; - profile_function([&]() { + //profile_function([&]() { float color_range = configuration.color_range; if(color_range == 0.0){ @@ -646,7 +646,7 @@ float get_color_range_hue(float progress){ else{ return_val = configuration.color + (color_range * progress); } - }, __func__); + //}, __func__); return return_val; } diff --git a/src/profiler.h b/src/profiler.h index b97156f..e19b151 100644 --- a/src/profiler.h +++ b/src/profiler.h @@ -1,5 +1,5 @@ // UNCOMMENT THIS TO ENABLE IT -#define PROFILER_ENABLED // Slows down the system, but allows watching how much total time each function takes up +//#define PROFILER_ENABLED // Slows down the system, but allows watching how much total time each function takes up #define PROFILER_SINGLE_SHOT \ (false) // Count only the most recent run or all runs since last print?