2021-03-28 01:19:55 +00:00
|
|
|
#pragma once
|
|
|
|
|
2021-03-29 08:10:55 +00:00
|
|
|
#include <Figment.h>
|
2021-03-28 01:19:55 +00:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class Sequencer: public Task {
|
|
|
|
public:
|
|
|
|
|
|
|
|
class Scene {
|
|
|
|
public:
|
|
|
|
const char* name;
|
|
|
|
std::vector<const char*> patterns;
|
2023-02-18 15:14:00 +00:00
|
|
|
void start();
|
|
|
|
void stop();
|
2021-03-28 01:19:55 +00:00
|
|
|
};
|
|
|
|
|
2023-02-18 15:14:00 +00:00
|
|
|
Sequencer();
|
2021-03-28 01:19:55 +00:00
|
|
|
|
|
|
|
void loop() override;
|
2022-06-11 09:02:27 +00:00
|
|
|
void onStart() override;
|
2021-03-28 01:19:55 +00:00
|
|
|
void handleEvent(const InputEvent& evt) override;
|
2023-02-18 15:14:00 +00:00
|
|
|
void setScenes(std::vector<Scene> &&scenes);
|
2021-03-28 01:19:55 +00:00
|
|
|
|
|
|
|
const char* currentSceneName();
|
|
|
|
const std::vector<Scene> scenes() const;
|
2023-12-11 06:57:49 +00:00
|
|
|
const std::vector<Command>& commands() const override;
|
2021-03-28 01:19:55 +00:00
|
|
|
|
|
|
|
private:
|
2022-06-11 09:02:27 +00:00
|
|
|
int m_idx;
|
2021-03-28 01:19:55 +00:00
|
|
|
std::vector<Scene> m_scenes;
|
|
|
|
};
|