From dc0b6bca37592f30e6dadfff9152cea27e663740 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 19 Dec 2024 23:32:26 +0100 Subject: [PATCH] fix forgotten debug output this was accidentally committed - doesn't hurt, but the code should only be active with WLED_DEBUG --- wled00/wled00.ino | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/wled00/wled00.ino b/wled00/wled00.ino index ff80af21..ce1721fd 100644 --- a/wled00/wled00.ino +++ b/wled00/wled00.ino @@ -62,9 +62,8 @@ unsigned long lastMillis = 0; //WLEDMM unsigned long loopCounter = 0; //WLEDMM unsigned long lps = 0; // loops per second -unsigned long lps2 = 0; // lps without "show" - -unsigned long long showtime = 0; // time spent in "show" (micros) +//unsigned long lps2 = 0; // lps without "show" +//unsigned long long showtime = 0; // time spent in "show" (micros) void setup() __attribute__((used)); // needed for -flto void setup() { @@ -77,24 +76,24 @@ void setup() { void loop() __attribute__((used)); // needed for -flto void loop() { //WLEDMM show loops per second +#ifdef WLED_DEBUG loopCounter++; //if (millis() - lastMillis >= 10000) { if (millis() - lastMillis >= 8000) { long delta = millis() - lastMillis; if (delta > 0) { lps = (loopCounter*1000U) / delta; - //USER_PRINTF("%lu lps\n",(loopCounter*1000U) / delta); - if (delta > (showtime / 1000)) lps2 = (loopCounter*1000U) / (delta - (showtime / 1000)); + //if (delta > (showtime / 1000)) lps2 = (loopCounter*1000U) / (delta - (showtime / 1000)); USER_PRINTF("%lu lps\t", lps); USER_PRINTF("%u fps\t", strip.getFps()); - USER_PRINTF("%lu lps without show\t\t", lps2); + //USER_PRINTF("%lu lps without show\t\t", lps2); USER_PRINTF("frametime %d\t", int(strip.getFrameTime())); USER_PRINTF("targetFPS %d\n", int(strip.getTargetFps())); } lastMillis = millis(); loopCounter = 0; - showtime = 0; + //showtime = 0; } - +#endif WLED::instance().loop(); }