Skip to content

Commit

Permalink
Adjust _PM_timerGetCount() fudge constant on ESP32-S3
Browse files Browse the repository at this point in the history
  • Loading branch information
PaintYourDragon committed Jul 26, 2023
1 parent 9766126 commit 5f0b40e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Adafruit Protomatter
version=1.5.8
version=1.5.9
author=Adafruit
maintainer=Adafruit <info@adafruit.com>
sentence=A library for Adafruit RGB LED matrices.
Expand Down
6 changes: 3 additions & 3 deletions src/arch/esp32-s3.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f0b40e

Please sign in to comment.