build for esp32 mask project

This commit is contained in:
2021-04-10 11:10:25 -07:00
parent 439a456d1a
commit 75bf48756b
24 changed files with 712 additions and 346 deletions

View File

@@ -25,10 +25,13 @@ Sequencer::scenes() const
void
Sequencer::handleEvent(const InputEvent& evt)
{
if (evt.intent == InputEvent::SetPattern && evt.asString() == m_scenes[m_idx].name) {
return;
}
if (evt.intent == InputEvent::SetPattern || evt.intent == InputEvent::NextPattern || evt.intent == InputEvent::PreviousPattern) {
Log.notice("Switching pattern!");
for(const char* pattern : m_scenes[m_idx].patterns) {
Log.notice("Stopping %s", pattern);
//Log.notice("Stopping %s", pattern);
MainLoop::instance()->dispatch(InputEvent{InputEvent::StopThing, pattern});
}
@@ -54,7 +57,7 @@ Sequencer::handleEvent(const InputEvent& evt)
}
for(const char* pattern : m_scenes[m_idx].patterns) {
Log.notice("Starting %s", pattern);
//Log.notice("Starting %s", pattern);
MainLoop::instance()->dispatch(InputEvent{InputEvent::StartThing, pattern});
}
}