From 7d5606085fbd775019fc514f3ffca84edfc11aa6 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Fri, 16 Jun 2017 02:01:02 +0300 Subject: Correctly calculate backlight level --- quantum/visualizer/visualizer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum') diff --git a/quantum/visualizer/visualizer.c b/quantum/visualizer/visualizer.c index 29db7005ce..486ff25b3f 100644 --- a/quantum/visualizer/visualizer.c +++ b/quantum/visualizer/visualizer.c @@ -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 { -- cgit v1.2.1