Make NeoPixel UI & Config Support RGBW
Found a bug in the MRLcomm.cpp file line 32 bool MrlNeopixel::attach(byte pin, int count, byte depth) { // FIXME - support "types/depth" // Pixel type flags, add together as needed: // NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) // NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) // NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products) // NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2) // NEO_RGBW Pixels are wired for RGBW bitstream (NeoPixel RGBW products) // initialization previousWaitMs = millis(); numPixels = count; strip = new Adafruit_NeoPixel(count, pin, NEO_GRB + NEO_KHZ800); strip->begin(); color = Adafruit_NeoPixel::Color(0, 110, 0, 0); wait = 1000; return true; }
Added in a test for pixel depth and allowed for setting of RGBW
bool MrlNeopixel::attach(byte pin, int count, byte depth) { // FIXME - support "types/depth" // Pixel type flags, add together as needed: // NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) // NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) // NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products) // NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2) // NEO_RGBW Pixels are wired for RGBW bitstream (NeoPixel RGBW products) // initialization previousWaitMs = millis(); numPixels = count; if(depth == 4) { strip = new Adafruit_NeoPixel(count, pin, NEO_GRBW + NEO_KHZ800); } else{ strip = new Adafruit_NeoPixel(count, pin, NEO_GRB + NEO_KHZ800); } strip->begin(); color = Adafruit_NeoPixel::Color(0, 110, 0, 0); wait = 1000; return true; }