mirror of
https://github.com/openstenoproject/qmk
synced 2024-11-13 03:54:42 +00:00
Notes Bugfix
This commit is contained in:
parent
5c98ad5960
commit
ef73ab6628
2 changed files with 33 additions and 38 deletions
|
@ -302,11 +302,6 @@ void matrix_init_user(void)
|
|||
void led_set_user(uint8_t usb_led)
|
||||
{
|
||||
static uint8_t old_usb_led = 0;
|
||||
static bool first_run = true;
|
||||
|
||||
// Skip first execution to avoid beeps caused by LED states being detected on power-up
|
||||
if (!first_run)
|
||||
{
|
||||
|
||||
if ((usb_led & (1<<USB_LED_CAPS_LOCK)) && !(old_usb_led & (1<<USB_LED_CAPS_LOCK)))
|
||||
{
|
||||
|
@ -338,9 +333,7 @@ void led_set_user(uint8_t usb_led)
|
|||
// If SCROLL LED is turning off...
|
||||
PLAY_NOTE_ARRAY(tone_scroll_off, false, LEGATO);
|
||||
}
|
||||
}
|
||||
old_usb_led = usb_led;
|
||||
first_run = false;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -351,7 +351,8 @@ void play_notes(float (*np)[][2], uint8_t n_count, bool n_repeat, float n_rest)
|
|||
|
||||
if (audio_config.enable) {
|
||||
|
||||
if (note || notes)
|
||||
// Cancel note if a note is playing
|
||||
if (note)
|
||||
stop_all_notes();
|
||||
|
||||
notes_pointer = np;
|
||||
|
@ -406,7 +407,8 @@ void play_note(double freq, int vol) {
|
|||
|
||||
if (audio_config.enable && voices < 8) {
|
||||
|
||||
if (note || notes)
|
||||
// Cancel notes if notes are playing
|
||||
if (notes)
|
||||
stop_all_notes();
|
||||
#ifdef PWM_AUDIO
|
||||
freq = freq / SAMPLE_RATE;
|
||||
|
|
Loading…
Reference in a new issue