adamjvr / lolshield

Automatically exported from code.google.com/p/lolshield
0 stars 0 forks source link

Grayscale enhancements #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I did some very minor grayscale enhancements to reap low hanging fruits:

- include Matt's "Fade" example
- remove BIT_DEPTH since it does not seem to be used anywhere
- rename COLORS to SHADES since there really is only one color ;)
- set SHADES to "5" (resulting in 4 shades plus black, i.e. OFF); this 
   seems to be the maximum bearable amount of shades the device can produce
   as of now.

Opinions? Rejections?

Original issue reported on code.google.com by thilo.al...@gmail.com on 7 Jan 2012 at 8:16

GoogleCodeExporter commented 9 years ago
Okay, I checked in a first attempt. PLEASE REVIEW THE CHANGES.

We now support a total of 8 different shades (including black / OFF) 
by solely relying on the high resolution timer.                      
PLEASE REVIEW these changes made to Charlieplexing.cpp.

COLORS has been renamed to SHADES.                                   
BIT_DEPTH has been removed; SHADES can be set directly.              

A FADE example based on Matt's has been added and extended
to allow for "performance tests".                                    

BasicTest has been extended to use double buffering. Since the buffer
is redrawn in a loop it uses synchronized buffer flip.               

A new mini-example "Breathe" has been added. "Breathe" simply fades
all the LEDs from off to on and back to off again, not unlike the
power LEDs of some laptop brands when the laptop is in suspend.
"Breathe" can be used to fine-tune the brightness of the individual 
shades. Currently the transitions feel far from fluent; I think we
could do better.

Okay, Matt, Jimmie, could you please have a look at the changes, especially 
those in Charlieplexing.cpp?

Original comment by thilo.al...@gmail.com on 7 Jan 2012 at 10:38

GoogleCodeExporter commented 9 years ago
I forgot: the revision this went in is rev-23.

Original comment by thilo.al...@gmail.com on 7 Jan 2012 at 10:49