Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kriegsman <1334634+kriegsman@users.noreply.github.com>2022-01-02 20:38:14 +0300
committerGitHub <noreply@github.com>2022-01-02 20:38:14 +0300
commit4582088b67c92ca78ca2f9555e8dbf8bfa821bcd (patch)
tree07a12158aff4adae25b479b41fa85ff1cce15177
parenta67bedb3e58e0d57883e599def0ab4497f5c7faf (diff)
parentc7dfa155dfd98271eda3ac48dd8986fb193c3635 (diff)
Merge pull request #1272 from ben-xo/feature/make-minimum-wait-optional
Make the minimum wait optional by defining NO_MINIMUM_WAIT
-rw-r--r--src/fastled_delay.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/fastled_delay.h b/src/fastled_delay.h
index a14e8a29..4f99e3f6 100644
--- a/src/fastled_delay.h
+++ b/src/fastled_delay.h
@@ -8,6 +8,9 @@
FASTLED_NAMESPACE_BEGIN
+
+#if (!defined(NO_MINIMUM_WAIT) || (NO_MINIMUM_WAIT==0))
+
/// Class to ensure that a minimum amount of time has kicked since the last time run - and delay if not enough time has passed yet
/// this should make sure that chipsets that have
template<int WAIT> class CMinWait {
@@ -26,6 +29,18 @@ public:
void mark() { mLastMicros = micros() & 0xFFFF; }
};
+#else
+
+// if you keep your own FPS (and therefore don't call show() too quickly for pixels to latch), you may not want a minimum wait.
+template<int WAIT> class CMinWait {
+public:
+ CMinWait() { }
+ void wait() { }
+ void mark() {}
+};
+
+#endif
+
////////////////////////////////////////////////////////////////////////////////////////////
//