Fix another integer overflow on 328 chips. Still needs work on others.

This commit is contained in:
root
2013-08-27 03:00:21 +00:00
parent 6ccc8712cd
commit 72c03d0a77
+1 -1
View File
@@ -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;