From 4464d90f4d3e64180f619d0663b8dd8f9b29b7e9 Mon Sep 17 00:00:00 2001 From: Brian Choromanski Date: Mon, 12 Mar 2018 18:18:40 -0400 Subject: Fixed plank keymaps so that they will compile for planck light --- keyboards/planck/keymaps/khord/config.h | 2 ++ keyboards/planck/keymaps/khord/keymap.c | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'keyboards/planck/keymaps/khord') diff --git a/keyboards/planck/keymaps/khord/config.h b/keyboards/planck/keymaps/khord/config.h index 43c8001cf7..955f6a1136 100644 --- a/keyboards/planck/keymaps/khord/config.h +++ b/keyboards/planck/keymaps/khord/config.h @@ -12,7 +12,9 @@ } #endif +#ifndef LIGHT_CONFIG_H #define BACKLIGHT_BREATHING +#endif #define TAPPING_TERM 150 #define MUSIC_MASK (keycode != KC_NO) diff --git a/keyboards/planck/keymaps/khord/keymap.c b/keyboards/planck/keymaps/khord/keymap.c index 6429369099..1ecab9bfb6 100644 --- a/keyboards/planck/keymaps/khord/keymap.c +++ b/keyboards/planck/keymaps/khord/keymap.c @@ -123,22 +123,30 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { case MACRO_BREATH_TOGGLE: if (record->event.pressed) { - breathing_toggle(); + #ifdef BACKLIGHT_BREATHING + breathing_toggle(); + #endif } break; case MACRO_BREATH_SPEED_INC: if (record->event.pressed) { - breathing_period_inc(); + #ifdef BACKLIGHT_BREATHING + breathing_period_inc(); + #endif } break; case MACRO_BREATH_SPEED_DEC: if (record->event.pressed) { - breathing_period_dec(); + #ifdef BACKLIGHT_BREATHING + breathing_period_dec(); + #endif } break; case MACRO_BREATH_DEFAULT: if (record->event.pressed) { - breathing_period_default(); + #ifdef BACKLIGHT_BREATHING + breathing_period_default(); + #endif } break; } -- cgit v1.2.3