small fixes

very minor changes:
* HUB75 bus don't leave _len uninitialized, handle display == nullptr before using display members
* __attribute__((pure)) was in the wrong location
* wled00.ino: made lps (loops-per-second) calculation a bit more accurate
This commit is contained in:
Frank
2024-10-03 00:19:18 +02:00
parent 3a38d0cfed
commit 1e5b246871
3 changed files with 12 additions and 3 deletions

View File

@@ -74,7 +74,10 @@ void loop() {
//WLEDMM show loops per second
loopCounter++;
if (millis() - lastMillis >= 10000) {
//USER_PRINTF("%lu lps\n",loopCounter/10);
long delta = millis() - lastMillis;
if (delta > 0) {
//USER_PRINTF("%lu lps\n",(loopCounter*1000U) / delta);
}
lastMillis = millis();
loopCounter = 0;
}