Changeset - 95fca30ce7ec
[Not reviewed]
default
0 1 0
Dennis Fink - 7 years ago 2018-02-06 23:36:55
dennis.fink@c3l.lu
Autoformat
1 file changed with 8 insertions and 9 deletions:
0 comments (0 inline, 0 general)
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));
0 comments (0 inline, 0 general)