feat: optimize neopattern example
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "NeoPattern.h"
|
||||
#include "NeoPatternState.h"
|
||||
#include "NeoPixelConfig.h"
|
||||
#include "PatternRegistry.h"
|
||||
#include <map>
|
||||
#include <functional>
|
||||
|
||||
@@ -70,14 +71,21 @@ private:
|
||||
NeoPatternType nameToPattern(const String& name) const;
|
||||
void resetStateForPattern(NeoPatternType pattern);
|
||||
uint32_t parseColor(const String& colorStr) const;
|
||||
|
||||
// Pattern validation methods
|
||||
bool isValidPattern(const String& name) const;
|
||||
bool isValidPattern(NeoPatternType type) const;
|
||||
bool patternRequiresColor2(const String& name) const;
|
||||
bool patternSupportsDirection(const String& name) const;
|
||||
String getPatternDescription(const String& name) const;
|
||||
|
||||
TaskManager& taskManager;
|
||||
NeoPattern* neoPattern;
|
||||
NeoPixelConfig config;
|
||||
NeoPatternState currentState;
|
||||
|
||||
std::map<String, std::function<void()>> patternUpdaters;
|
||||
std::map<String, NeoPatternType> nameToPatternMap;
|
||||
// Pattern registry for centralized pattern management
|
||||
PatternRegistry patternRegistry;
|
||||
|
||||
NeoPatternType activePattern;
|
||||
NeoDirection direction;
|
||||
|
||||
Reference in New Issue
Block a user