legacy code cleanup
This commit is contained in:
@@ -2061,25 +2061,16 @@ void WS2812FX::show(void) {
|
|||||||
|
|
||||||
estimateCurrentAndLimitBri();
|
estimateCurrentAndLimitBri();
|
||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLEDMM_FASTPATH)
|
unsigned long showNow = millis(); // include time needed for busses.show()
|
||||||
unsigned long showNow = 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
|
|
||||||
|
|
||||||
// some buses send asynchronously and this method will return before
|
// some buses send asynchronously and this method will return before
|
||||||
// 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();
|
||||||
|
|
||||||
#if !defined(ARDUINO_ARCH_ESP32) || !defined(WLEDMM_FASTPATH) // upstream legacy
|
|
||||||
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 = showNow - _lastShow;
|
unsigned long diff = showNow - _lastShow;
|
||||||
uint16_t fpsCurr = 200;
|
uint16_t fpsCurr = 200;
|
||||||
if (diff > 0) fpsCurr = 1000 / diff;
|
if (diff > 0) fpsCurr = 1000 / diff;
|
||||||
|
|||||||
Reference in New Issue
Block a user