Skip to content

Commit

Permalink
legacy code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
softhack007 committed Nov 4, 2024
1 parent dc4964a commit 68c4b83
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions wled00/FX_fcn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2061,25 +2061,16 @@ void WS2812FX::show(void) {

estimateCurrentAndLimitBri();

#if defined(ARDUINO_ARCH_ESP32) && defined(WLEDMM_FASTPATH)
unsigned long showNow = millis();
#ifdef ARDUINO_ARCH_ESP32 // WLEDMM more accurate FPS measurement for ESP32
unsigned long showNow = millis(); // include time needed for busses.show()
#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

// some buses send asynchronously and this method will return before
// all of the data has been sent.
// See https://github.com/Makuna/NeoPixelBus/wiki/ESP32-NeoMethods#neoesp32rmt-methods
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;
uint16_t fpsCurr = 200;
if (diff > 0) fpsCurr = 1000 / diff;
Expand Down

0 comments on commit 68c4b83

Please sign in to comment.