Skip to content

Commit 841c42f

Browse files
committed
Ensure a 1ms gap between frames to ensure data behaves for Pixies
1 parent faa066c commit 841c42f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

chipsets.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,20 @@ FASTLED_NAMESPACE_BEGIN
2626
template<uint8_t DATA_PIN, EOrder RGB_ORDER = RGB>
2727
class PixieController : public CLEDController {
2828
SoftwareSerial Serial;
29+
CMinWait<1000> mWait;
2930
public:
3031
PixieController() : Serial(-1, DATA_PIN) {}
3132

3233
virtual void clearLeds(int nLeds) { showColor(CRGB(0,0,0), nLeds, CRGB(0,0,0)); };
3334

3435
protected:
3536
virtual void init() {
36-
3737
Serial.begin(115200);
38+
mWait.mark();
3839
}
3940

4041
void show(PixelController<RGB_ORDER> & pixels) {
42+
mWait.wait();
4143
while(pixels.has(1)) {
4244
uint8_t r = pixels.loadAndScale0();
4345
Serial.write(r);
@@ -48,6 +50,7 @@ class PixieController : public CLEDController {
4850
pixels.advanceData();
4951
pixels.stepDithering();
5052
}
53+
mWait.mark();
5154
}
5255

5356
virtual void showColor(const struct CRGB & data, int nLeds, CRGB scale) {

0 commit comments

Comments
 (0)