Skip to content
Permalink
Browse files

Added new SmartMatrix_GFX::newLedsPtr.

This allows drawing into a SmartMatrix buffer directly, saving the need
for an unneeded extra FB.
  • Loading branch information...
marcmerlin committed Apr 5, 2019
1 parent 6cb370d commit d827a11283c18aa61b3fe828bedfd8d87ceb1a40
Showing with 5 additions and 0 deletions.
  1. +4 −0 SmartMatrix_GFX.cpp
  2. +1 −0 SmartMatrix_GFX.h
@@ -70,6 +70,10 @@ void SmartMatrix_GFX::begin() {
Serial.println(numpix);
}

void SmartMatrix_GFX::newLedsPtr(CRGB *new_leds_ptr) {
_leds = new_leds_ptr;
}

// Expand 16-bit input color (Adafruit_GFX colorspace) to 24-bit (NeoPixel)
// (w/gamma adjustment)
static uint32_t expandColor(uint16_t color) {
@@ -116,6 +116,7 @@ class SmartMatrix_GFX : public Adafruit_GFX {


void begin(); // no-op in this lib, left for compat
void newLedsPtr(CRGB *);


private:

0 comments on commit d827a11

Please sign in to comment.
You can’t perform that action at this time.