diff options
| author | Jack Humbert <jack.humb@gmail.com> | 2016-04-15 16:19:43 -0400 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2016-04-15 16:19:43 -0400 |
| commit | 91119636631f24bd1bf97f32c3d39f8828da625f (patch) | |
| tree | b301cb936ef1985a00e634fa98fa90ccdc1b98f8 /quantum/audio.c | |
| parent | bdb6dceaebc358dd4aae593d51d3ba0dd61858a9 (diff) | |
| parent | 2557b91644d9565c43f0e5c27d45788d4a47f3eb (diff) | |
| download | qmk_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/audio.c')
| -rw-r--r-- | quantum/audio.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/quantum/audio.c b/quantum/audio.c index f29d941d7..50e5505fe 100644 --- a/quantum/audio.c +++ b/quantum/audio.c | |||
| @@ -255,7 +255,12 @@ ISR(TIMER3_COMPA_vect) { | |||
| 255 | 255 | ||
| 256 | 256 | ||
| 257 | note_position++; | 257 | note_position++; |
| 258 | if (note_position >= note_length) { | 258 | bool end_of_note = false; |
| 259 | if (ICR3 > 0) | ||
| 260 | end_of_note = (note_position >= (note_length / ICR3 * 0xFFFF)); | ||
| 261 | else | ||
| 262 | end_of_note = (note_position >= (note_length * 0x7FF)); | ||
| 263 | if (end_of_note) { | ||
| 259 | current_note++; | 264 | current_note++; |
| 260 | if (current_note >= notes_length) { | 265 | if (current_note >= notes_length) { |
| 261 | if (notes_repeat) { | 266 | if (notes_repeat) { |
