X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=main.c;h=ac75428bce7ca04780b8eae92afbd45dbd24d986;hb=8381b2e127303cc81feccf0a1b6b65b59ee1155e;hp=9f910dfbe6841e0dd0d29fac0d01418fbd1ca450;hpb=68f80504da1a457abc62f854ada9de7efd3c5b30;p=rgblamp.git diff --git a/main.c b/main.c index 9f910df..ac75428 100644 --- a/main.c +++ b/main.c @@ -35,13 +35,8 @@ #include "task.h" #include "adc_random.h" -#if 0 #define AUTO_OFF_COUNT 549316UL /* 5 hrs in 32.768 ms units */ #define AUTO_ON_COUNT 2087402UL /* 19 hrs in 32.768 ms units */ -#else -#define AUTO_OFF_COUNT 1831 /* 1 minute in 32.768 ms units */ -#define AUTO_ON_COUNT 3662 /* 2 minutes in 32.768 ms units */ -#endif #define rand_u8() (rand() & 0xff) #define rand_u16() ((rand() << 8) + rand_u8()) #define rand_incolor_steps(s) (min_incolor_steps[s & 3] + \ @@ -68,17 +63,10 @@ typedef struct { } led_t; /* The index of all step arrays is the speed variable */ -#if 1 const static unsigned min_incolor_steps[4] = { 320, 32, 32, 1 }; const static unsigned range_incolor_steps[4] = { 32768, 128, 32, 8 }; const static int min_fade_steps[4] = { 64, 32, 32, 1 }; const static int range_fade_steps[4] = { 416, 128, 32, 8 }; -#else /* for debugging */ -const static unsigned min_incolor_steps[4] = { 64, 32, 16, 8 }; -const static unsigned range_incolor_steps[4] = { 1, 1, 1, 1 }; -const static int min_fade_steps[4] = { 64, 32, 16, 8 }; -const static int range_fade_steps[4] = { 1, 1, 1, 1 }; -#endif led_t red; led_t grn;