med1111 / lolshield

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

Grayscale patch makes LEDs flicker #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run BasicTest with lolshield 0.2 release, watch LEDs.
2. Run BasicTest with latest lolshield svn, watch LEDs.

What is the expected output? What do you see instead?
Expected: Steady LED lights when they are switched on, like they did in 
lolshield-0.2 release.
Instead: LEDs flicker annoyingly. They do not seem to be at 100% brightness, 
but that's a guess.

Original issue reported on code.google.com by thilo.al...@gmail.com on 6 Jan 2012 at 1:14

GoogleCodeExporter commented 8 years ago
Okay, this was fun, Patch is ready!

Wow, this one is NASTY! SetBrightness() is called way too early during init(), 
at a time where backTimer* has not been initialised. Since SetBrightness() 
writes to places where backTimer* is pointing the function will write into raw 
memory *somewhere*, problably into code being executed.

So I moved SetBrightness() way down after all necessary pointers are 
initialised. Now everything works fine :)

How to apply the patch:
- check out the lolshield SVN trunk
- apply arduino-1.0-include.patch from LoLShield issue #17 
(http://code.google.com/p/lolshield/issues/detail?id=17) if it has not been 
applied already.
- put the patch file init-brightness-after-assigning-backTimer-pointer.patch 
into the checkout directory
- run 
    patch -p0 < init-brightness-after-assigning-backTimer-pointer.patch

Original comment by thilo.al...@gmail.com on 6 Jan 2012 at 4:49

Attachments:

GoogleCodeExporter commented 8 years ago
For the record: This defect is by no means "Medium". It's "Major" to 
"Critical", but as a User/Reporter I'm unable to adjust the severity.

Original comment by thilo.al...@gmail.com on 6 Jan 2012 at 5:00

GoogleCodeExporter commented 8 years ago
Fixed in revision 21.

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