Skip to content

Commit

Permalink
Correctly calculate backlight level
Browse files Browse the repository at this point in the history
  • Loading branch information
fredizzimo committed Jun 15, 2017
1 parent 19f0285 commit 7d56060
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quantum/visualizer/visualizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ static DECLARE_THREAD_FUNCTION(visualizerThread, arg) {
if(current_status.backlight_level != state.status.backlight_level) {
if (current_status.backlight_level != 0) {
gdispGSetPowerMode(LED_DISPLAY, powerOn);
uint16_t percent = (uint16_t)current_status.backlight_level * 100 / 255;
uint16_t percent = (uint16_t)current_status.backlight_level * 100 / BACKLIGHT_LEVELS;
gdispGSetBacklight(LED_DISPLAY, percent);
}
else {
Expand Down

0 comments on commit 7d56060

Please sign in to comment.