fix forgotten debug output
this was accidentally committed - doesn't hurt, but the code should only be active with WLED_DEBUG
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user