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/pvc/keymap.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'keyboards/planck/keymaps/pvc/keymap.c') diff --git a/keyboards/planck/keymaps/pvc/keymap.c b/keyboards/planck/keymaps/pvc/keymap.c index a0981573ab..2e81dcad6a 100644 --- a/keyboards/planck/keymaps/pvc/keymap.c +++ b/keyboards/planck/keymaps/pvc/keymap.c @@ -316,28 +316,36 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case MACRO_BREATH_TOGGLE: if (record->event.pressed) { + #ifdef BACKLIGHT_BREATHING breathing_toggle(); + #endif } break; case MACRO_BREATH_SPEED_INC: if (record->event.pressed) { + #ifdef BACKLIGHT_BREATHING breathing_period_inc(); + #endif } break; case MACRO_BREATH_SPEED_DEC: if (record->event.pressed) { + #ifdef BACKLIGHT_BREATHING breathing_period_dec(); + #endif } break; case MACRO_BREATH_DEFAULT: if (record->event.pressed) { + #ifdef BACKLIGHT_BREATHING breathing_period_default(); + #endif } break; @@ -352,8 +360,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { layer_on(LAYER_UPPER); - breathing_period_set(2); - breathing_pulse(); + #ifdef BACKLIGHT_BREATHING + breathing_period_set(2); + breathing_pulse(); + #endif update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); } else @@ -367,8 +377,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { layer_on(LAYER_LOWER); - breathing_period_set(2); - breathing_pulse(); + #ifdef BACKLIGHT_BREATHING + breathing_period_set(2); + breathing_pulse(); + #endif update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); } else @@ -381,14 +393,18 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case MACRO_FUNCTION: if (record->event.pressed) { - breathing_period_set(3); - breathing_enable(); + #ifdef BACKLIGHT_BREATHING + breathing_period_set(3); + breathing_enable(); + #endif layer_on(LAYER_FUNCTION); } else { - breathing_period_set(1); - breathing_self_disable(); + #ifdef BACKLIGHT_BREATHING + breathing_period_set(1); + breathing_self_disable(); + #endif layer_off(LAYER_FUNCTION); } break; -- cgit v1.2.3