forked from Michel2/LoLshield
Fix another integer overflow on 328 chips. Still needs work on others.
This commit is contained in:
@@ -424,7 +424,7 @@ void LedSign::SetBrightness(uint8_t brightness)
|
|||||||
// set up page counts
|
// set up page counts
|
||||||
// TODO: make SHADES a function parameter. This would require some refactoring.
|
// TODO: make SHADES a function parameter. This would require some refactoring.
|
||||||
const int max = 255;
|
const int max = 255;
|
||||||
const float scale = 2.5;
|
const float scale = 1.8;
|
||||||
const float delta = pow(max, 1.0 / scale) / (SHADES - 1);
|
const float delta = pow(max, 1.0 / scale) / (SHADES - 1);
|
||||||
int counts[SHADES];
|
int counts[SHADES];
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
|
|||||||
Reference in New Issue
Block a user