diff options
author | Brian Choromanski <BrianChoromanski@gmail.com> | 2018-03-12 18:18:40 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2018-03-13 02:21:18 -0400 |
commit | 4464d90f4d3e64180f619d0663b8dd8f9b29b7e9 (patch) | |
tree | 2cabd2ea555666e7c0de48024139e27d1909cb31 /keyboards/planck/keymaps/zrichard | |
parent | 2dacf25f284551fa423bfdb309b4ad99e4253095 (diff) | |
download | qmk_firmware-4464d90f4d3e64180f619d0663b8dd8f9b29b7e9.tar.gz |
Fixed plank keymaps so that they will compile for planck light
Diffstat (limited to 'keyboards/planck/keymaps/zrichard')
-rwxr-xr-x | keyboards/planck/keymaps/zrichard/config.h | 4 | ||||
-rwxr-xr-x | keyboards/planck/keymaps/zrichard/keymap.c | 32 |
2 files changed, 28 insertions, 8 deletions
diff --git a/keyboards/planck/keymaps/zrichard/config.h b/keyboards/planck/keymaps/zrichard/config.h index aa8991e01..216801c85 100755 --- a/keyboards/planck/keymaps/zrichard/config.h +++ b/keyboards/planck/keymaps/zrichard/config.h @@ -26,9 +26,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 12 /* Planck PCB default pin-out */ +#ifndef LIGHT_CONFIG_H #define MATRIX_ROW_PINS { D0, D5, B5, B6 } #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } #define UNUSED_PINS +#endif /* Prevent use of disabled MIDI features in the keymap */ //#define MIDI_ENABLE_STRICT 1 @@ -64,7 +66,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Only print user print statements */ #define USER_PRINT +#ifndef LIGHT_CONFIG_H #define BACKLIGHT_BREATHING +#endif /* disable action features */ //#define NO_ACTION_LAYER diff --git a/keyboards/planck/keymaps/zrichard/keymap.c b/keyboards/planck/keymaps/zrichard/keymap.c index bb4e19fa0..9ae4c7b74 100755 --- a/keyboards/planck/keymaps/zrichard/keymap.c +++ b/keyboards/planck/keymaps/zrichard/keymap.c @@ -325,28 +325,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; @@ -361,8 +369,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 @@ -376,8 +386,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 @@ -390,14 +402,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; |