port to platformio

This commit is contained in:
2021-03-29 01:10:55 -07:00
parent 9a3bf84214
commit a6534bcb20
131 changed files with 1537 additions and 1148 deletions

31
lib/Figments/Renderer.cpp Normal file
View 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();
}