port to platformio
This commit is contained in:
31
lib/Figments/Renderer.cpp
Normal file
31
lib/Figments/Renderer.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#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();
|
||||
}
|
||||
Reference in New Issue
Block a user