diff --git a/config.sample.h b/config.sample.h index e9b97dc..2801cd3 100644 --- a/config.sample.h +++ b/config.sample.h @@ -27,4 +27,14 @@ uint8_t config_brightness = 20; // Can be overwritten via MQTT_TOPIC_BRIGHTNESS #define FPS 50 #define SHOW_TEXT_DELAY 100 + +// Effect config uint16_t config_effect_cycle_time = 300; // Time in seconds between cycling effects. + +uint16_t config_effect_matrix_length_min = 4; +uint16_t config_effect_matrix_length_max = 20; +uint16_t config_effect_matrix_speed_min = 50; +uint16_t config_effect_matrix_speed_max = 135; + +uint16_t config_effect_single_dynamic_loop_time = 200; +uint16_t config_effect_multi_dynamic_loop_time = 1400; diff --git a/effects.h b/effects.h index c5df912..a455ad7 100644 --- a/effects.h +++ b/effects.h @@ -272,7 +272,7 @@ class SingleDynamic : public Effect { protected: static const int factor = 2; static const int tile_count = LED_WIDTH/factor * LED_HEIGHT/factor; - virtual int getLoopTime() { return 200; } + virtual int getLoopTime() { return config_effect_single_dynamic_loop_time; } CRGB tiles[tile_count]; CRGB old_tiles[tile_count]; uint8_t blend = 0; @@ -281,7 +281,7 @@ class SingleDynamic : public Effect { for (int i=0; ih); } void start() { y=-1; - length = random8()%16+4; + length = random8(config_effect_matrix_length_min, config_effect_matrix_length_max); running = true; - speed = random8()/3 + 50; + speed = random8(config_effect_matrix_speed_min, config_effect_matrix_speed_max); } void advance() {