summaryrefslogtreecommitdiffstats
path: root/keyboards/planck/keymaps/aviator
diff options
context:
space:
mode:
authorBrian Choromanski <BrianChoromanski@gmail.com>2018-03-12 18:18:40 -0400
committerJack Humbert <jack.humb@gmail.com>2018-03-13 02:21:18 -0400
commit4464d90f4d3e64180f619d0663b8dd8f9b29b7e9 (patch)
tree2cabd2ea555666e7c0de48024139e27d1909cb31 /keyboards/planck/keymaps/aviator
parent2dacf25f284551fa423bfdb309b4ad99e4253095 (diff)
Fixed plank keymaps so that they will compile for planck light
Diffstat (limited to 'keyboards/planck/keymaps/aviator')
-rw-r--r--keyboards/planck/keymaps/aviator/config.h2
-rw-r--r--keyboards/planck/keymaps/aviator/keymap.c20
2 files changed, 15 insertions, 7 deletions
diff --git a/keyboards/planck/keymaps/aviator/config.h b/keyboards/planck/keymaps/aviator/config.h
index 81232367db..5bd98a74b7 100644
--- a/keyboards/planck/keymaps/aviator/config.h
+++ b/keyboards/planck/keymaps/aviator/config.h
@@ -3,8 +3,10 @@
#include "config_common.h"
+#ifndef LIGHT_CONFIG_H
#define BACKLIGHT_BREATHING
#define BREATHING_PERIOD 3
+#endif
#ifdef AUDIO_ENABLE
#define STARTUP_SONG SONG(PLANCK_SOUND)
diff --git a/keyboards/planck/keymaps/aviator/keymap.c b/keyboards/planck/keymaps/aviator/keymap.c
index 8ce9a8e174..889fd72903 100644
--- a/keyboards/planck/keymaps/aviator/keymap.c
+++ b/keyboards/planck/keymaps/aviator/keymap.c
@@ -126,14 +126,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
- breathing_self_disable();
+ #ifdef BACKLIGHT_BREATHING
+ breathing_self_disable();
+ #endif
}
return false;
break;
case DATA:
if (record->event.pressed) {
set_single_persistent_default_layer(_DATA);
- #ifdef BACKLIGHT_ENABLE
+ #ifdef BACKLIGHT_BREATHING
breathing_enable();
#endif
}
@@ -144,7 +146,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_on(_LOWER);
uint8_t default_layer = biton32(default_layer_state);
if (default_layer == _QWERTY) {
- #ifdef BACKLIGHT_ENABLE
+ #ifdef BACKLIGHT_BREATHING
breathing_enable();
#endif
}
@@ -153,7 +155,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_LOWER);
uint8_t default_layer = biton32(default_layer_state);
if (default_layer == _QWERTY) {
- breathing_self_disable();
+ #ifdef BACKLIGHT_BREATHING
+ breathing_self_disable();
+ #endif
}
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
@@ -164,7 +168,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_on(_RAISE);
uint8_t default_layer = biton32(default_layer_state);
if (default_layer == _QWERTY) {
- #ifdef BACKLIGHT_ENABLE
+ #ifdef BACKLIGHT_BREATHING
breathing_enable();
#endif
}
@@ -173,7 +177,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
layer_off(_RAISE);
uint8_t default_layer = biton32(default_layer_state);
if (default_layer == _QWERTY) {
- breathing_self_disable();
+ #ifdef BACKLIGHT_BREATHING
+ breathing_self_disable();
+ #endif
}
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
@@ -182,7 +188,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case BACKLIT:
if (record->event.pressed) {
register_code(KC_RSFT);
- #ifdef BACKLIGHT_ENABLE
+ #ifdef BACKLIGHT_BREATHING
backlight_step();
#endif
} else {