projects
/
moodlight.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ff48d9a
)
some more colors on the remote interpreted
author
simimeie
<simimeie>
Thu, 1 Jul 2010 23:56:19 +0000
(23:56 +0000)
committer
simimeie
<simimeie>
Thu, 1 Jul 2010 23:56:19 +0000
(23:56 +0000)
main.c
patch
|
blob
|
blame
|
history
diff --git
a/main.c
b/main.c
index 5e9fb2220793c5d30ceb9d2433888a70a1463bd2..b94bc1d7b7acd3d412e977e6e96b9e792c1a4704 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-1,4
+1,4
@@
-/* $Id: main.c,v 1.
4 2010/06/30 19:39:28
simimeie Exp $
+/* $Id: main.c,v 1.
5 2010/07/01 23:56:19
simimeie Exp $
* Main file for the HaWo moodlight.
* This is the main file that glues it all together. It also contains all
* functionality that is too small to require an extra file.
* Main file for the HaWo moodlight.
* This is the main file that glues it all together. It also contains all
* functionality that is too small to require an extra file.
@@
-97,6
+97,12
@@
int main(void)
if (ledpwm_bri > 0) { ledpwm_bri--; }
}
break;
if (ledpwm_bri > 0) { ledpwm_bri--; }
}
break;
+ case 0x02: /* "Off" */
+ ledpwm_bri = 0;
+ break;
+ case 0x03: /* "On" */
+ ledpwm_bri = 128;
+ break;
case 0x04: /* Red */
if (irstate == IRSTATE_RED) {
ledpwm_re = 0xff; ledpwm_gr = 0; ledpwm_bl = 0;
case 0x04: /* Red */
if (irstate == IRSTATE_RED) {
ledpwm_re = 0xff; ledpwm_gr = 0; ledpwm_bl = 0;
@@
-133,18
+139,34
@@
int main(void)
ledpwm_re = 0xff; ledpwm_gr = 0x40; ledpwm_bl = 0x00;
irstate = 0;
break;
ledpwm_re = 0xff; ledpwm_gr = 0x40; ledpwm_bl = 0x00;
irstate = 0;
break;
+ case 0x09: /* greenish cyan */
+ ledpwm_re = 0x00; ledpwm_gr = 0xff; ledpwm_bl = 0x80;
+ irstate = 0;
+ break;
case 0x0c: /* orange */
ledpwm_re = 0xff; ledpwm_gr = 0x80; ledpwm_bl = 0x00;
irstate = 0;
break;
case 0x0c: /* orange */
ledpwm_re = 0xff; ledpwm_gr = 0x80; ledpwm_bl = 0x00;
irstate = 0;
break;
+ case 0x0d: /* cyan */
+ ledpwm_re = 0x00; ledpwm_gr = 0xff; ledpwm_bl = 0xff;
+ irstate = 0;
+ break;
case 0x10: /* bright orange */
ledpwm_re = 0xff; ledpwm_gr = 0xc0; ledpwm_bl = 0x00;
irstate = 0;
break;
case 0x10: /* bright orange */
ledpwm_re = 0xff; ledpwm_gr = 0xc0; ledpwm_bl = 0x00;
irstate = 0;
break;
+ case 0x11: /* blueish cyan */
+ ledpwm_re = 0x00; ledpwm_gr = 0xa0; ledpwm_bl = 0xff;
+ irstate = 0;
+ break;
case 0x14: /* yellow */
ledpwm_re = 0xff; ledpwm_gr = 0xff; ledpwm_bl = 0x00;
irstate = 0;
break;
case 0x14: /* yellow */
ledpwm_re = 0xff; ledpwm_gr = 0xff; ledpwm_bl = 0x00;
irstate = 0;
break;
+ case 0x15: /* blueerish cyan */
+ ledpwm_re = 0x00; ledpwm_gr = 0x60; ledpwm_bl = 0xff;
+ irstate = 0;
+ break;
};
ledpwm_setled(LEDPWM_REDLED, (((uint16_t)ledpwm_re * ledpwm_bri) / 255));
ledpwm_setled(LEDPWM_GREENLED, (((uint16_t)ledpwm_gr * ledpwm_bri) / 255));
};
ledpwm_setled(LEDPWM_REDLED, (((uint16_t)ledpwm_re * ledpwm_bri) / 255));
ledpwm_setled(LEDPWM_GREENLED, (((uint16_t)ledpwm_gr * ledpwm_bri) / 255));
This page took
0.051434 seconds
and
4
git commands to generate.