From 4931510ad38aadb1769c9241bfad0c3d77ad687f Mon Sep 17 00:00:00 2001 From: Balz Guenat Date: Mon, 1 Jan 2018 23:47:51 +0100 Subject: backlight breathing overhaul (#2187) * add breathing to bananasplit * backlight breathing overhaul * fix the backlight_tick thing. * fix for vision_division backlight * fix a few keymaps and probably break breathing for some weirdly set-up boards. * remove BL_x keycodes because they made unreasonable assumptions * some fixes for BL keycodes * integer cie lightness scaling * use cie lightness for non-breathing backlight and make breathing able to reach true max brightness --- quantum/keymap_common.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'quantum/keymap_common.c') diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index b1460c53c..a0d4c1ddb 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -127,8 +127,11 @@ action_t action_for_key(uint8_t layer, keypos_t key) action.code = ACTION_MODS_TAP_KEY(mod, keycode & 0xFF); break; #ifdef BACKLIGHT_ENABLE - case BL_0 ... BL_15: - action.code = ACTION_BACKLIGHT_LEVEL(keycode - BL_0); + case BL_ON: + action.code = ACTION_BACKLIGHT_ON(); + break; + case BL_OFF: + action.code = ACTION_BACKLIGHT_OFF(); break; case BL_DEC: action.code = ACTION_BACKLIGHT_DECREASE(); -- cgit v1.2.3-24-g4f1b