Skip to content

Commit

Permalink
Fix another integer overflow on 328 chips. Still needs work on others.
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Aug 27, 2013
1 parent 6ccc871 commit 72c03d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Charliplexing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ void LedSign::SetBrightness(uint8_t brightness)
// set up page counts
// TODO: make SHADES a function parameter. This would require some refactoring.
const int max = 255;
const float scale = 2.5;
const float scale = 1.8;
const float delta = pow(max, 1.0 / scale) / (SHADES - 1);
int counts[SHADES];
uint8_t i;
Expand Down

0 comments on commit 72c03d0

Please sign in to comment.