Skip to content

Commit

Permalink
Allow changing parameters after constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulStoffregen committed Nov 28, 2017
1 parent 52fd9f4 commit 8236d68
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions OctoWS2811.cpp
Expand Up @@ -68,6 +68,15 @@ OctoWS2811::OctoWS2811(uint32_t numPerStrip, void *frameBuf, void *drawBuf, uint
// Discussion about timing and flicker & color shift issues:
// http://forum.pjrc.com/threads/23877-WS2812B-compatible-with-OctoWS2811-library?p=38190&viewfull=1#post38190

void OctoWS2811::begin(uint32_t numPerStrip, void *frameBuf, void *drawBuf, uint8_t config)
{
stripLen = numPerStrip;
frameBuffer = frameBuf;
drawBuffer = drawBuf;
params = config;
begin();
}

void OctoWS2811::begin(void)
{
uint32_t bufsize, frequency;
Expand Down
1 change: 1 addition & 0 deletions OctoWS2811.h
Expand Up @@ -54,6 +54,7 @@ class OctoWS2811 {
public:
OctoWS2811(uint32_t numPerStrip, void *frameBuf, void *drawBuf, uint8_t config = WS2811_GRB);
void begin(void);
void begin(uint32_t numPerStrip, void *frameBuf, void *drawBuf, uint8_t config = WS2811_GRB);

void setPixel(uint32_t num, int color);
void setPixel(uint32_t num, uint8_t red, uint8_t green, uint8_t blue) {
Expand Down

0 comments on commit 8236d68

Please sign in to comment.