#include "buttons.h"
#include "rgb.h"
#include "timer.h"
+#include "adc_random.h"
#define AUTO_OFF_COUNT 549316UL /* 5 hrs in 32.768 ms units */
#define reset_steps() do { incolor_steps = 1; fade_steps = 0; } \
int fade_steps;
unsigned long auto_off = 0;
-
pic_init();
unused_init();
buttons_init();
timer_init();
dbgpin_init();
+ srand((adc_random() << 8) + adc_random());
reset_steps();
if (buttons_on())
rgb_on();
/* Next incolor and fade steps */
incolor_steps = rand_incolor_steps(speed);
- fade_steps = (buttons & IN_ROCKERA) ? 1 : rand_fade_steps(speed);
+ fade_steps = rand_fade_steps(speed);
/* Compute increment and remainder for each led */
red.increment = (newr - red.value) / fade_steps;