I'm tired and forgot to add two files to previous commits. :-/
This commit is contained in:
parent
ead076f9a3
commit
77fdba213a
@ -21,3 +21,11 @@ class MultiDynamicEffect : public SingleDynamicEffect {
|
|||||||
public:
|
public:
|
||||||
void loop();
|
void loop();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class BigDynamicEffect : public Effect {
|
||||||
|
private:
|
||||||
|
Window* window = new Window(0, 0, LED_WIDTH, LED_HEIGHT-6);
|
||||||
|
public:
|
||||||
|
void loop();
|
||||||
|
~BigDynamicEffect();
|
||||||
|
};
|
||||||
|
@ -11,6 +11,11 @@ void Window::setPixel(uint8_t x, uint8_t y, CRGB* color) {
|
|||||||
leds[this->coordsToGlobalIndex(x, y)] = *color;
|
leds[this->coordsToGlobalIndex(x, y)] = *color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Window::raisePixel(uint8_t x, uint8_t y, CRGB* color) {
|
||||||
|
if (x>=this->width || y>=this->height) return;
|
||||||
|
leds[this->coordsToGlobalIndex(x, y)] |= *color;
|
||||||
|
}
|
||||||
|
|
||||||
void Window::setPixelByIndex(uint16_t index, CRGB* color) {
|
void Window::setPixelByIndex(uint16_t index, CRGB* color) {
|
||||||
uint8_t x = index % this->width;
|
uint8_t x = index % this->width;
|
||||||
uint8_t y = index / this->width;
|
uint8_t y = index / this->width;
|
||||||
|
Loading…
Reference in New Issue
Block a user