renderbug-cpp/firmware/Figments/Renderer.cpp
2021-03-27 18:19:55 -07:00

29 lines
612 B
C++

#include "./Renderer.h"
#include "./Display.h"
void
Renderer::loop()
{
for(Display* dpy : m_displays) {
for(Figment* figment : m_figments) {
if (figment->state == Task::Running) {
//Log.info("Rendering %s", figment->name);
figment->render(dpy);
//Log.info("next");
} else {
//Log.info("Not rendering %s", figment->name);
}
};
}
NSFastLED::FastLED.show();
}
void
Renderer::onStart()
{
for(Display* dpy : m_displays) {
dpy->clear();
}
NSFastLED::FastLED.show();
}