diff options
author | IBNobody <[email protected]> | 2016-04-15 13:09:42 -0500 |
---|---|---|
committer | IBNobody <[email protected]> | 2016-04-15 13:09:42 -0500 |
commit | 39e520c010072aa17c0bcb2c5bfbbee08e010170 (patch) | |
tree | 4f9b28ad7bc26f2b62ee2bd966b04cbd0f1f5e79 /quantum | |
parent | 66c1024bd328b687fba0645f70469094e75d624c (diff) | |
parent | ee2ee7f4f049dda385a9db7dddd8e7e91681315b (diff) | |
download | qmk_firmware-39e520c010072aa17c0bcb2c5bfbbee08e010170.tar.gz qmk_firmware-39e520c010072aa17c0bcb2c5bfbbee08e010170.zip |
Prepping for merge with new_defaults
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/audio.c | 7 | ||||
-rw-r--r-- | quantum/keymap_common.c | 10 | ||||
-rw-r--r-- | quantum/quantum.mk | 8 |
3 files changed, 14 insertions, 11 deletions
diff --git a/quantum/audio.c b/quantum/audio.c index f29d941d7c..50e5505fe0 100644 --- a/quantum/audio.c +++ b/quantum/audio.c @@ -255,7 +255,12 @@ ISR(TIMER3_COMPA_vect) { note_position++; - if (note_position >= note_length) { + bool end_of_note = false; + if (ICR3 > 0) + end_of_note = (note_position >= (note_length / ICR3 * 0xFFFF)); + else + end_of_note = (note_position >= (note_length * 0x7FF)); + if (end_of_note) { current_note++; if (current_note >= notes_length) { if (notes_repeat) { diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index ae6cddb343..e3030a8869 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/>. #include "audio.h" float goodbye[][2] = { - {440.0*pow(2.0,(67)/12.0), 400}, - {0, 50}, - {440.0*pow(2.0,(60)/12.0), 400}, - {0, 50}, - {440.0*pow(2.0,(55)/12.0), 600}, + {440.0*pow(2.0,(67)/12.0), 8}, + {440.0*pow(2.0,(60)/12.0), 8}, + {440.0*pow(2.0,(55)/12.0), 12}, }; #endif @@ -90,7 +88,7 @@ action_t action_for_key(uint8_t layer, keypos_t key) action_t action; clear_keyboard(); #ifdef AUDIO_ENABLE - play_notes(&goodbye, 5, false); + play_notes(&goodbye, 3, false); #endif _delay_ms(250); #ifdef ATREUS_ASTAR diff --git a/quantum/quantum.mk b/quantum/quantum.mk index 3069f582c3..17bb501718 100644 --- a/quantum/quantum.mk +++ b/quantum/quantum.mk @@ -23,19 +23,19 @@ ifndef CUSTOM_MATRIX SRC += $(QUANTUM_DIR)/matrix.c endif -ifeq ($(MIDI_ENABLE), yes) +ifeq ($(strip $(MIDI_ENABLE)), yes) SRC += $(QUANTUM_DIR)/keymap_midi.c endif -ifeq ($(AUDIO_ENABLE), yes) +ifeq ($(strip $(AUDIO_ENABLE)), yes) SRC += $(QUANTUM_DIR)/audio.c endif -ifeq ($(UNICODE_ENABLE), yes) +ifeq ($(strip $(UNICODE_ENABLE)), yes) SRC += $(QUANTUM_DIR)/keymap_unicode.c endif -ifeq ($(RGBLIGHT_ENABLE), yes) +ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) SRC += $(QUANTUM_DIR)/light_ws2812.c SRC += $(QUANTUM_DIR)/rgblight.c OPT_DEFS += -DRGBLIGHT_ENABLE |