33 lines
797 B
C++
33 lines
797 B
C++
#include "./TestAnimation.h"
|
|
#include "../Static.h"
|
|
#include <FastLED.h>
|
|
|
|
void
|
|
TestAnimation::loop()
|
|
{
|
|
m_x += 1;
|
|
m_y += 1;
|
|
}
|
|
|
|
void
|
|
TestAnimation::render(Display* dpy) const
|
|
{
|
|
for(unsigned int i = 0; i < dpy->pixelCount(); i++) {
|
|
dpy->pixelAt(i) = CRGB{255, 255, 255};
|
|
}
|
|
return;
|
|
// Blank the canvas to white
|
|
Surface{dpy, {0, 0}, {255, 255}} = CRGB{255, 255, 255};
|
|
// Draw red line on top row
|
|
Surface{dpy, {0, 0}, {255, 0}} = CRGB{255, 0, 0};
|
|
// Green line on first column
|
|
Surface{dpy, {0, 0}, {0, 255}} = CRGB{0, 255, 0};
|
|
|
|
//Surface{dpy, {m_x, 0}, {m_x, 255}} = CRGB{255, 0, 0};
|
|
///Surface{dpy, {0, m_y}, {255, m_y}} = CRGB{255, 0, 0};
|
|
//dpy->pixelAt(VirtualCoordinates{m_x, m_y}) = CRGB{255, 0, 255};
|
|
}
|
|
|
|
STATIC_ALLOC(TestAnimation);
|
|
STATIC_TASK(TestAnimation);
|