renderbug-cpp/lib/Figments/Renderer.cpp

32 lines
645 B
C++

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