aboutsummaryrefslogtreecommitdiff
path: root/quantum/keymap_common.c
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-04-15 16:19:43 -0400
committerJack Humbert <jack.humb@gmail.com>2016-04-15 16:19:43 -0400
commit91119636631f24bd1bf97f32c3d39f8828da625f (patch)
treeb301cb936ef1985a00e634fa98fa90ccdc1b98f8 /quantum/keymap_common.c
parentbdb6dceaebc358dd4aae593d51d3ba0dd61858a9 (diff)
parent2557b91644d9565c43f0e5c27d45788d4a47f3eb (diff)
downloadqmk_firmware-91119636631f24bd1bf97f32c3d39f8828da625f.tar.gz
qmk_firmware-91119636631f24bd1bf97f32c3d39f8828da625f.zip
Merge pull request #256 from jackhumbert/new_defaults
New default planck layout, audio fixes, makefile overwrites, tri-layer quantum-wide
Diffstat (limited to 'quantum/keymap_common.c')
-rw-r--r--quantum/keymap_common.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c
index ae6cddb34..3a00d36f0 100644
--- a/quantum/keymap_common.c
+++ b/quantum/keymap_common.c
@@ -33,11 +33,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
33 #include "audio.h" 33 #include "audio.h"
34 34
35 float goodbye[][2] = { 35 float goodbye[][2] = {
36 {440.0*pow(2.0,(67)/12.0), 400}, 36 {440.0*pow(2.0,(67)/12.0), 8},
37 {0, 50}, 37 {440.0*pow(2.0,(60)/12.0), 8},
38 {440.0*pow(2.0,(60)/12.0), 400}, 38 {440.0*pow(2.0,(55)/12.0), 12},
39 {0, 50},
40 {440.0*pow(2.0,(55)/12.0), 600},
41 }; 39 };
42#endif 40#endif
43 41
@@ -90,7 +88,7 @@ action_t action_for_key(uint8_t layer, keypos_t key)
90 action_t action; 88 action_t action;
91 clear_keyboard(); 89 clear_keyboard();
92 #ifdef AUDIO_ENABLE 90 #ifdef AUDIO_ENABLE
93 play_notes(&goodbye, 5, false); 91 play_notes(&goodbye, 3, false);
94 #endif 92 #endif
95 _delay_ms(250); 93 _delay_ms(250);
96 #ifdef ATREUS_ASTAR 94 #ifdef ATREUS_ASTAR
@@ -293,3 +291,11 @@ action_t keymap_func_to_action(uint16_t keycode)
293 // For FUNC without 8bit limit 291 // For FUNC without 8bit limit
294 return (action_t){ .code = pgm_read_word(&fn_actions[(int)keycode]) }; 292 return (action_t){ .code = pgm_read_word(&fn_actions[(int)keycode]) };
295} 293}
294
295void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
296 if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
297 layer_on(layer3);
298 } else {
299 layer_off(layer3);
300 }
301}