Min brightness bug fix w/black screen

This commit is contained in:
Paint Your Dragon 2011-11-26 23:29:08 -08:00
parent a61bd16cf6
commit 57c7083188
1 changed files with 1 additions and 1 deletions

View File

@ -347,7 +347,7 @@ void draw () {
sum = ledColor[i][0] + ledColor[i][1] + ledColor[i][2];
if(sum < minBrightness) {
if(sum == 0) { // To avoid divide-by-zero
deficit = sum / 3; // Spread equally to R,G,B
deficit = minBrightness / 3; // Spread equally to R,G,B
ledColor[i][0] += deficit;
ledColor[i][1] += deficit;
ledColor[i][2] += deficit;