From cc7604d11670cf3155d53f0019557b249b1192c0 Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Fri, 16 Sep 2016 17:15:33 -0400 Subject: Add breathing, as initial implementation with the RAISE/LOWER keys. And throw in extra macros to shorten keymaps --- keyboards/planck/keymaps/cbbrowne/config.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'keyboards/planck/keymaps/cbbrowne/config.h') diff --git a/keyboards/planck/keymaps/cbbrowne/config.h b/keyboards/planck/keymaps/cbbrowne/config.h index 58cd2cc5b..1e04ba61d 100644 --- a/keyboards/planck/keymaps/cbbrowne/config.h +++ b/keyboards/planck/keymaps/cbbrowne/config.h @@ -3,6 +3,9 @@ #include "../../config.h" +#define LEADER_TIMEOUT 300 +#define BACKLIGHT_BREATHING + /* cbbrowne user configuration */ #define randadd 53 @@ -16,5 +19,3 @@ #endif - - -- cgit v1.2.3 From 1f290f6213c7c3bf001a85242cfae4f9b5a14942 Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Thu, 1 Dec 2016 16:21:15 -0500 Subject: Make my builds smaller --- keyboards/planck/keymaps/cbbrowne/Makefile | 7 ++++--- keyboards/planck/keymaps/cbbrowne/config.h | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'keyboards/planck/keymaps/cbbrowne/config.h') diff --git a/keyboards/planck/keymaps/cbbrowne/Makefile b/keyboards/planck/keymaps/cbbrowne/Makefile index 581e08cd0..3c20da84b 100644 --- a/keyboards/planck/keymaps/cbbrowne/Makefile +++ b/keyboards/planck/keymaps/cbbrowne/Makefile @@ -5,8 +5,8 @@ # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work @@ -16,10 +16,11 @@ AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend ifndef QUANTUM_DIR include ../../../../Makefile -endif \ No newline at end of file +endif diff --git a/keyboards/planck/keymaps/cbbrowne/config.h b/keyboards/planck/keymaps/cbbrowne/config.h index 1e04ba61d..bd15fd5a2 100644 --- a/keyboards/planck/keymaps/cbbrowne/config.h +++ b/keyboards/planck/keymaps/cbbrowne/config.h @@ -1,6 +1,9 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H +#define NO_DEBUG +#define NO_PRINT + #include "../../config.h" #define LEADER_TIMEOUT 300 -- cgit v1.2.3 From 49e72632d2200fc3bf71d5ced2aa43058da3b2e0 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 16 Feb 2017 13:13:38 -0500 Subject: remove more warnings --- keyboards/ergodox/keymaps/coderkun_neo2/keymap.c | 2 ++ keyboards/ergodox/keymaps/twey/keymap.c | 1 + keyboards/planck/keymaps/cbbrowne/config.h | 4 +++ keyboards/planck/keymaps/unicode/keymap.c | 45 +++++++++++++++--------- quantum/keymap_extras/keymap_french.h | 4 ++- 5 files changed, 39 insertions(+), 17 deletions(-) (limited to 'keyboards/planck/keymaps/cbbrowne/config.h') diff --git a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c index b62b14449..aaf75d58f 100644 --- a/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c +++ b/keyboards/ergodox/keymaps/coderkun_neo2/keymap.c @@ -312,6 +312,8 @@ uint16_t hex_to_keycode(uint8_t hex) return NEO_E; case 0xF: return NEO_F; + default: + return KC_NO; } } } diff --git a/keyboards/ergodox/keymaps/twey/keymap.c b/keyboards/ergodox/keymaps/twey/keymap.c index 5deacd63f..1ecbce466 100644 --- a/keyboards/ergodox/keymaps/twey/keymap.c +++ b/keyboards/ergodox/keymaps/twey/keymap.c @@ -205,6 +205,7 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { + __attribute__ ((unused)) uint32_t layer0 = layer_state & (1UL << 0), layer1 = layer_state & (1UL << 1), layer2 = layer_state & (1UL << 2), diff --git a/keyboards/planck/keymaps/cbbrowne/config.h b/keyboards/planck/keymaps/cbbrowne/config.h index bd15fd5a2..3a4ee907f 100644 --- a/keyboards/planck/keymaps/cbbrowne/config.h +++ b/keyboards/planck/keymaps/cbbrowne/config.h @@ -1,8 +1,12 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H +#ifndef NO_DEBUG #define NO_DEBUG +#endif +#ifndef NO_PRINT #define NO_PRINT +#endif #include "../../config.h" diff --git a/keyboards/planck/keymaps/unicode/keymap.c b/keyboards/planck/keymaps/unicode/keymap.c index d73e7e09d..1b4ca8ed7 100644 --- a/keyboards/planck/keymaps/unicode/keymap.c +++ b/keyboards/planck/keymaps/unicode/keymap.c @@ -195,24 +195,20 @@ const uint16_t PROGMEM fn_actions[] = { }; #ifdef AUDIO_ENABLE -float tone_startup[][2] = { - {440.0*pow(2.0,(31)/12.0), 12}, - {440.0*pow(2.0,(28)/12.0), 8}, - {440.0*pow(2.0,(19)/12.0), 8}, - {440.0*pow(2.0,(24)/12.0), 8}, - {440.0*pow(2.0,(28)/12.0), 20} -}; +float tone_startup[][2] = SONG(STARTUP_SOUND); float tone_qwerty[][2] = SONG(QWERTY_SOUND); float tone_dvorak[][2] = SONG(DVORAK_SOUND); float tone_colemak[][2] = SONG(COLEMAK_SOUND); float tone_plover[][2] = SONG(PLOVER_SOUND); float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -float goodbye[][2] = SONG(GOODBYE_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); #endif + void persistant_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); @@ -309,18 +305,35 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) }; void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - _delay_ms(20); // stops the tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); - #endif + #ifdef AUDIO_ENABLE + startup_user(); + #endif } #ifdef AUDIO_ENABLE -void play_goodbye_tone() + +void startup_user() { - PLAY_NOTE_ARRAY(goodbye, false, 0); - _delay_ms(150); + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); } -#endif +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif diff --git a/quantum/keymap_extras/keymap_french.h b/quantum/keymap_extras/keymap_french.h index 834c69650..401bbdf64 100644 --- a/quantum/keymap_extras/keymap_french.h +++ b/quantum/keymap_extras/keymap_french.h @@ -4,7 +4,9 @@ #include "keymap.h" // Alt gr +#ifndef ALGR #define ALGR(kc) RALT(kc) +#endif #define NO_ALGR KC_RALT // Normal characters @@ -72,7 +74,7 @@ #define FR_PIPE ALGR(KC_6) #define FR_GRV ALGR(KC_7) #define FR_BSLS ALGR(KC_8) -#define FR_CIRC ALGR(KC_9) +#define FR_CCIRC ALGR(KC_9) #define FR_AT ALGR(KC_0) #define FR_RBRC ALGR(FR_RPRN) #define FR_RCBR ALGR(FR_EQL) -- cgit v1.2.3