diff options
author | WIJU <wiju@skidata.com> | 2021-12-22 12:02:10 +0300 |
---|---|---|
committer | WIJU <wiju@skidata.com> | 2021-12-22 12:02:10 +0300 |
commit | 0f3ed0b04e77b6fb38aec8d69b1ad8ea6d6cfc7b (patch) | |
tree | d3a0c4b37fa73d5391e53c9b0c975d4b8be630a6 | |
parent | 1d236ab05a6bb241a3b9e02ed433f25517c725bb (diff) |
avoid 200ms flicker every ~17.9 seconds with RMT driver
see also issue #1329
-rw-r--r-- | src/platforms/esp/32/clockless_rmt_esp32.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/platforms/esp/32/clockless_rmt_esp32.cpp b/src/platforms/esp/32/clockless_rmt_esp32.cpp index 9c89fcb4..0f8ad9b3 100644 --- a/src/platforms/esp/32/clockless_rmt_esp32.cpp +++ b/src/platforms/esp/32/clockless_rmt_esp32.cpp @@ -463,9 +463,9 @@ void IRAM_ATTR ESP32RMTController::fillNext(bool check_time) { uint32_t now = __clock_cycles(); if (check_time) { - if (mLastFill != 0 and now > mLastFill) { - uint32_t delta = (now - mLastFill); - if (delta > mMaxCyclesPerFill) { + if (mLastFill != 0) { + int32_t delta = (now - mLastFill); + if (delta > (int32_t)mMaxCyclesPerFill) { // Serial.print(delta); // Serial.print(" BAIL "); // Serial.println(mCur); |