renaming
upstream has renamed "now" to "showNow" - so we follow
This commit is contained in:
@@ -2062,7 +2062,7 @@ void WS2812FX::show(void) {
|
||||
estimateCurrentAndLimitBri();
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLEDMM_FASTPATH)
|
||||
unsigned long nowUp = millis();
|
||||
unsigned long showNow = millis();
|
||||
#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
|
||||
#endif
|
||||
@@ -2074,18 +2074,18 @@ void WS2812FX::show(void) {
|
||||
busses.show();
|
||||
|
||||
#if !defined(ARDUINO_ARCH_ESP32) || !defined(WLEDMM_FASTPATH) // upstream legacy
|
||||
unsigned long nowUp = millis();
|
||||
unsigned long showNow = millis();
|
||||
#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
|
||||
#endif
|
||||
#endif
|
||||
|
||||
unsigned long diff = nowUp - _lastShow;
|
||||
unsigned long diff = showNow - _lastShow;
|
||||
uint16_t fpsCurr = 200;
|
||||
if (diff > 0) fpsCurr = 1000 / diff;
|
||||
_cumulativeFps = (3 * _cumulativeFps + fpsCurr +2) >> 2; // "+2" for proper rounding (2/4 = 0.5)
|
||||
_lastShow = nowUp;
|
||||
_lastServiceShow = nowUp;
|
||||
_lastShow = showNow;
|
||||
_lastServiceShow = showNow;
|
||||
|
||||
#ifdef ARDUINO_ARCH_ESP32 // WLEDMM more accurate FPS measurement for ESP32
|
||||
int64_t diff500 = now500 - _lastShow500;
|
||||
|
||||
Reference in New Issue
Block a user