37 void addProfile(uint8_t profileIndex, std::unique_ptr<Profile> profile);
88 std::array<std::unique_ptr<Profile>,
MAX_PROFILES> profileSlots;
89 uint8_t currentProfile = 0;
91 std::vector<ILEDController*> selectLeds;
94 bool postSwitchBlink =
false;
95 bool blinkStarted =
false;
96 uint32_t blinkStartTime = 0;
97 uint8_t blinkPhase = 0;
98 static constexpr uint8_t BLINK_COUNT = 3;
99 static constexpr uint32_t BLINK_INTERVAL = 150;
Base class for all pedal actions.
Manages up to MAX_PROFILES profiles with LED feedback.
bool hasActiveDelayedAction() const
Returns true if any DelayedAction across all profiles is currently running.
const std::string & getProfileName(uint8_t profileIndex) const
const Profile * getProfile(uint8_t profileIndex) const
static constexpr uint8_t MAX_PROFILES
2^6 − 1 (6 select LEDs max)
Action * getAction(uint8_t profileIndex, uint8_t button) const
uint8_t getCurrentProfile() const
static const char * getActionTypeString(Action::Type actionType)
static constexpr uint8_t MAX_SELECT_LEDS
void resetToFirstProfile()
Reset to the first populated slot (or slot 0 if all empty)
void setCurrentProfile(uint8_t profileIndex)
Directly set the current profile without triggering blink feedback.
void update(uint32_t now)
Drive timed LED behaviour — call every loop iteration.
uint8_t switchProfile()
Advance to the next populated profile slot and trigger blink feedback.
void addProfile(uint8_t profileIndex, std::unique_ptr< Profile > profile)
Represents a single button configuration profile.