Schalter „Alle Kategorien“: automatischer Wechsel durch alle Effekte

Neues Feld allCategories in /api/state (nach dem Einschalten false),
in der App ein zweiter Schalter unter „Automatisch wechseln“.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mikeandClaude Opus 5.5 committed 2026-11-16 15:28:42 +01:00
1 parent e5e424a7a6
commit f8360c31f6
9 files changed
+39 -10

No files matched your search

+3 -1
View File
@@ -14,6 +14,7 @@ const uint8_t LEVELS[] = {BRIGHTNESS / 2, BRIGHTNESS, BRIGHTNESS * 2};
uint8_t brightnessLevel = 1;
uint8_t brightness, highlight;
bool autoAdvance = true;
bool autoAll = false;
void setBaseBrightness(uint8_t b) {
brightness = b;
@@ -172,10 +173,11 @@ void startEffect(uint8_t i, uint32_t now) {
}
// Nächster Effekt derselben Kategorie
// Nächster Effekt: nur aus der Kategorie des laufenden, mit autoAll aus allen
uint8_t nextEffect(uint8_t i) {
uint8_t n = i;
do n = (n + 1) % NUM_EFFECTS;
while (EFFECTS[n].category != EFFECTS[i].category);
while (!autoAll && EFFECTS[n].category != EFFECTS[i].category);
return n;
}