Skip to content

Commit

Permalink
Fix audio on WT60-XT (qmk#12526)
Browse files Browse the repository at this point in the history
  • Loading branch information
wilba authored Apr 15, 2021
1 parent a69616c commit a8c013a
Showing 1 changed file with 22 additions and 25 deletions.
47 changes: 22 additions & 25 deletions keyboards/wilba_tech/wt60_xt/wt60_xt.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,32 +65,29 @@ bool led_update_kb(led_t led_state) {

wait_ms(10); // gets rid of tick

if (!is_playing_notes())
if (led_state.caps_lock && !old_led_state.caps_lock)
{
if (led_state.caps_lock && !old_led_state.caps_lock)
{
PLAY_SONG(tone_caps_on);
}
else if (!led_state.caps_lock && old_led_state.caps_lock)
{
PLAY_SONG(tone_caps_off);
}
else if (led_state.num_lock && !old_led_state.num_lock)
{
PLAY_SONG(tone_numlk_on);
}
else if (!led_state.num_lock && old_led_state.num_lock)
{
PLAY_SONG(tone_numlk_off);
}
else if (led_state.scroll_lock && !old_led_state.scroll_lock)
{
PLAY_SONG(tone_scroll_on);
}
else if (!led_state.scroll_lock && old_led_state.scroll_lock)
{
PLAY_SONG(tone_scroll_off);
}
PLAY_SONG(tone_caps_on);
}
else if (!led_state.caps_lock && old_led_state.caps_lock)
{
PLAY_SONG(tone_caps_off);
}
else if (led_state.num_lock && !old_led_state.num_lock)
{
PLAY_SONG(tone_numlk_on);
}
else if (!led_state.num_lock && old_led_state.num_lock)
{
PLAY_SONG(tone_numlk_off);
}
else if (led_state.scroll_lock && !old_led_state.scroll_lock)
{
PLAY_SONG(tone_scroll_on);
}
else if (!led_state.scroll_lock && old_led_state.scroll_lock)
{
PLAY_SONG(tone_scroll_off);
}

old_led_state = led_state;
Expand Down

0 comments on commit a8c013a

Please sign in to comment.