renderbug-cpp/firmware/Figments/Renderer.cpp

29 lines
612 B
C++
Raw Normal View History

2019-05-10 05:17:29 +00:00
#include "./Renderer.h"
#include "./Display.h"
void
Renderer::loop()
{
for(Display* dpy : m_displays) {
for(Figment* figment : m_figments) {
if (figment->state == Task::Running) {
2021-03-28 01:19:55 +00:00
//Log.info("Rendering %s", figment->name);
2019-05-10 05:17:29 +00:00
figment->render(dpy);
2021-03-28 01:19:55 +00:00
//Log.info("next");
} else {
//Log.info("Not rendering %s", figment->name);
2019-05-10 05:17:29 +00:00
}
};
}
NSFastLED::FastLED.show();
}
void
Renderer::onStart()
{
for(Display* dpy : m_displays) {
dpy->clear();
}
NSFastLED::FastLED.show();
}