animations: chimes: drop UserInput event type handling

This commit is contained in:
Torrie Fischer 2023-12-23 11:01:21 +01:00
parent 07e71ad4c0
commit cd6c097b76

View File

@ -26,13 +26,7 @@ void ChimesAnimation::randomize() {
}
void ChimesAnimation::handleEvent(const InputEvent& evt) {
if (evt.intent == InputEvent::UserInput) {
if (strcmp(evt.asString(), "blobs") == 0) {
m_blobs.toggle();
} else if (strcmp(evt.asString(), "chimes") == 0) {
m_chimes.toggle();
}
} else if (evt.intent == InputEvent::SetColor) {
if (evt.intent == InputEvent::SetColor) {
m_flashBrightness.set(255, 0);
m_flashColor = evt.asRGB();
uint8_t flashHue = rgb2hsv_approximate(m_flashColor).hue;