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