@@ -299,11 +299,11 @@ 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);
@@ -311,8 +311,7 @@ void loop() {
}
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));