File diff 6ca9558755f3 → 95fca30ce7ec
Neopixel_Goggles.ino
Show inline comments
 
@@ -299,24 +299,23 @@ void setup() {
 
void loop() {
 
  Rings.Update();
 
  /*
 
   * We could store the return of the first millis call in a variable.
 
   * But this routine is fast, so we only loose some milliseconds (if even)
 
   * and we are not that time critical, that the MODE changes extacly after
 
   * MODE_CHANGE_TIME. Calling millis twice, saves us 8 bytes, which is critical
 
   * for the small storage space we have.
 
   */
 
     We could store the return of the first millis call in a variable.
 
     But this routine is fast, so we only loose some milliseconds (if even)
 
     and we are not that time critical, that the MODE changes extacly after
 
     MODE_CHANGE_TIME. Calling millis twice, saves us 8 bytes, which is critical
 
     for the small storage space we have.
 
  */
 
  if ((millis() - prev_time) >= MODE_CHANGE_TIME) {
 
    mode = random(0, 9);
 
    prev_time = millis();
 
  }
 
}
 

	
 
void RingsComplete()
 
{
 
void RingsComplete() {
 
  uint16_t slow_interval = random(SLOW_INTERVAL_MIN, SLOW_INTERVAL_MAX + 1);
 
  uint16_t steps = random(STEPS_MIN, STEPS_MAX + 1);
 
  uint32_t color = Rings.Wheel(random(COLOR_MIN, COLOR_MAX + 1));
 
  
 

	
 
  switch (mode) {
 
    case 0:
 
      Rings.RainbowCycle(random(RAINBOW_CYCLE_MIN_INTERVAL, RAINBOW_CYCLE_MAX_INTERVAL + 1));