Commit 85a86985 authored by Jan Kasprzak's avatar Jan Kasprzak
Browse files

rgb-led-string: Christmas tree mod after real-world testing

parent 5013d759
......@@ -6,7 +6,7 @@
static unsigned char jiffies;
// #define CHRISTMAS_TREE 1
#define CHRISTMAS_TREE 1
#define rgb_return(r, g, b) do { send_rgb((r), (g), (b)); return 1; } while(0)
......@@ -232,14 +232,16 @@ static unsigned char midstar_pixel(unsigned char pos)
static void background(unsigned char pos)
{
#ifdef CHRISTMAS_TREE
switch ((pos >> 4) & 3) {
case 0: if (pos & 1) send_rgb(7, 0, 0); else send_rgb(0, 7, 0);
switch ((pos >> 3) & 3) {
//case 0: if (pos & 1) send_rgb(7, 0, 7); else send_rgb(0, 7, 5);
//case 0: if (pos & 1) send_rgb(0, 0, 7); else send_rgb(7, 7, 7);
case 0: if (pos & 1) send_rgb(0, 0, 7); else send_rgb(0, 7, 0);
break;
case 1: if (pos & 1) send_rgb(0, 0, 7); else send_rgb(7, 7, 7);
case 1: if (pos & 1) send_rgb(7, 0, 7); else send_rgb(7, 0, 0);
break;
case 2: if (pos & 1) send_rgb(7, 0, 7); else send_rgb(0, 7, 5);
case 2: if (pos & 1) send_rgb(7, 5, 0); else send_rgb(7, 7, 7);
break;
case 3: if (pos & 1) send_rgb(7, 5, 0); else send_rgb(7, 7, 7);
case 3: if (pos & 1) send_rgb(7, 0, 0); else send_rgb(0, 7, 0);
break;
}
#else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment