fix compile errors

This commit is contained in:
Frank
2024-11-01 15:12:07 +01:00
parent 1c782aa369
commit bf5fb9ccaa

View File

@@ -2062,7 +2062,7 @@ void WS2812FX::show(void) {
estimateCurrentAndLimitBri(); estimateCurrentAndLimitBri();
#if defined(ARDUINO_ARCH_ESP32) && defined(WLEDMM_FASTPATH) #if defined(ARDUINO_ARCH_ESP32) && defined(WLEDMM_FASTPATH)
unsigned long now = millis(); unsigned long nowUp = millis();
#ifdef ARDUINO_ARCH_ESP32 // WLEDMM more accurate FPS measurement for ESP32 #ifdef ARDUINO_ARCH_ESP32 // WLEDMM more accurate FPS measurement for ESP32
uint64_t now500 = esp_timer_get_time() / 2; // native timer; micros /2 -> millis * 500 uint64_t now500 = esp_timer_get_time() / 2; // native timer; micros /2 -> millis * 500
#endif #endif
@@ -2072,18 +2072,20 @@ void WS2812FX::show(void) {
// all of the data has been sent. // all of the data has been sent.
// See https://github.com/Makuna/NeoPixelBus/wiki/ESP32-NeoMethods#neoesp32rmt-methods // See https://github.com/Makuna/NeoPixelBus/wiki/ESP32-NeoMethods#neoesp32rmt-methods
busses.show(); busses.show();
unsigned long now = millis();
#if !defined(ARDUINO_ARCH_ESP32) || !defined(WLEDMM_FASTPATH) // upstream legacy
unsigned long nowUp = millis();
#ifdef ARDUINO_ARCH_ESP32 // WLEDMM more accurate FPS measurement for ESP32 #ifdef ARDUINO_ARCH_ESP32 // WLEDMM more accurate FPS measurement for ESP32
uint64_t now500 = esp_timer_get_time() / 2; // native timer; micros /2 -> millis * 500 uint64_t now500 = esp_timer_get_time() / 2; // native timer; micros /2 -> millis * 500
#endif #endif
#endif #endif
unsigned long diff = now - _lastShow; unsigned long diff = nowUp - _lastShow;
uint16_t fpsCurr = 200; uint16_t fpsCurr = 200;
if (diff > 0) fpsCurr = 1000 / diff; if (diff > 0) fpsCurr = 1000 / diff;
_cumulativeFps = (3 * _cumulativeFps + fpsCurr +2) >> 2; // "+2" for proper rounding (2/4 = 0.5) _cumulativeFps = (3 * _cumulativeFps + fpsCurr +2) >> 2; // "+2" for proper rounding (2/4 = 0.5)
_lastShow = now; _lastShow = nowUp;
_lastServiceShow = now; _lastServiceShow = nowUp;
#ifdef ARDUINO_ARCH_ESP32 // WLEDMM more accurate FPS measurement for ESP32 #ifdef ARDUINO_ARCH_ESP32 // WLEDMM more accurate FPS measurement for ESP32
int64_t diff500 = now500 - _lastShow500; int64_t diff500 = now500 - _lastShow500;