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:
authordanielgarcia@gmail.com <danielgarcia@gmail.com@4ad4ec5c-605d-bd5c-5796-512c9b60011b>2013-11-07 16:21:36 +0400
committerdanielgarcia@gmail.com <danielgarcia@gmail.com@4ad4ec5c-605d-bd5c-5796-512c9b60011b>2013-11-07 16:21:36 +0400
commitadc78ce93b7b6b009aab35e9fce94074920b6bf5 (patch)
treef52c5728f3989c19e0198279244f2ee89a5ed01d
parent99e2bd146992d1ba59dbfe516f4653657b95dfc9 (diff)
Fix clock adjustment when there's more than ~140 leds.
-rw-r--r--clockless.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/clockless.h b/clockless.h
index d3818448..238276ef 100644
--- a/clockless.h
+++ b/clockless.h
@@ -110,7 +110,7 @@ public:
showRGBInternal<0, false>(nLeds, scale, (const byte*)&data);
// Adjust the timer
- long microsTaken = CLKS_TO_MICROS(nLeds * 24 * (T1 + T2 + T3));
+ long microsTaken = CLKS_TO_MICROS((long)nLeds * 24 * (T1 + T2 + T3));
MS_COUNTER += (microsTaken / 1000);
sei();
mWait.mark();
@@ -123,7 +123,7 @@ public:
showRGBInternal<0, true>(nLeds, scale, (const byte*)rgbdata);
// Adjust the timer
- long microsTaken = CLKS_TO_MICROS(nLeds * 24 * (T1 + T2 + T3));
+ long microsTaken = CLKS_TO_MICROS((long)nLeds * 24 * (T1 + T2 + T3));
MS_COUNTER += (microsTaken / 1000);
sei();
mWait.mark();
@@ -137,7 +137,7 @@ public:
showRGBInternal<1, true>(nLeds, scale, (const byte*)rgbdata);
// Adjust the timer
- long microsTaken = CLKS_TO_MICROS(nLeds * 24 * (T1 + T2 + T3));
+ long microsTaken = CLKS_TO_MICROS((long)nLeds * 24 * (T1 + T2 + T3));
MS_COUNTER += (microsTaken / 1000);
sei();
mWait.mark();
@@ -315,4 +315,4 @@ public:
#endif
};
-#endif \ No newline at end of file
+#endif