From 5f0b40ed5991e22da63add5dbaeb7c194b72b607 Mon Sep 17 00:00:00 2001 From: Phillip Burgess Date: Wed, 26 Jul 2023 11:25:55 -0700 Subject: [PATCH] Adjust _PM_timerGetCount() fudge constant on ESP32-S3 --- library.properties | 2 +- src/arch/esp32-s3.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library.properties b/library.properties index 0e3d3d7..dd46d1c 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Adafruit Protomatter -version=1.5.8 +version=1.5.9 author=Adafruit maintainer=Adafruit sentence=A library for Adafruit RGB LED matrices. diff --git a/src/arch/esp32-s3.h b/src/arch/esp32-s3.h index 3ae3d6c..7dea06e 100644 --- a/src/arch/esp32-s3.h +++ b/src/arch/esp32-s3.h @@ -67,11 +67,11 @@ static uint32_t dmaSetupTime = 100; // timer frequency (40 MHz), i.e. 2 cycles/column, to return a fair estimate // of the one-scanline transfer time, from which everything is extrapolated: IRAM_ATTR inline uint32_t _PM_timerGetCount(Protomatter_core *core) { - // Time estimate seems to come in a little high, so the -25 here is an + // Time estimate seems to come in a little high, so the -10 here is an // empirically-derived fudge factor that may yield ever-so-slightly better // refresh in some edge cases. If visual glitches are encountered, might - // need to dial back this number a bit. - return dmaSetupTime + core->chainBits * 2 - 25; + // need to dial back this number a bit or remove it. + return dmaSetupTime + core->chainBits * 2 - 10; } // Note that dmaSetupTime can vary from line to line, potentially influenced // by interrupts, nondeterministic DMA channel clearing times, etc., which is