Skip to content
This repository has been archived by the owner on Sep 12, 2019. It is now read-only.

Commit

Permalink
Keymap: add clicky support to jetpacktuxedo keymap (qmk#3990)
Browse files Browse the repository at this point in the history
controlled by dip 3 with pitch modulated by the knob
  • Loading branch information
jetpacktuxedo authored and drashna committed Sep 28, 2018
1 parent a65085a commit 246d539
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions keyboards/planck/keymaps/jetpacktuxedo/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#ifdef AUDIO_ENABLE
#define STARTUP_SONG SONG(PLANCK_SOUND)
#define AUDIO_CLICKY
#endif

/*
Expand Down Expand Up @@ -30,3 +31,4 @@

// Most tactile encoders have detents every 4 stages
#define ENCODER_RESOLUTION 4

13 changes: 13 additions & 0 deletions keyboards/planck/keymaps/jetpacktuxedo/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ uint8_t muse_offset = 70;
uint16_t muse_tempo = 20;

void encoder_update(bool clockwise) {
if (is_clicky_on()) {
if (clockwise) {
clicky_freq_up();
} else {
clicky_freq_down();
}
} else
if (muse_mode) {
if (IS_LAYER_ON(_RAISE)) {
if (clockwise) {
Expand Down Expand Up @@ -248,6 +255,12 @@ void dip_update(uint8_t index, bool active) {
stop_all_notes();
#endif
}
case 2:
if (active) {
clicky_on();
} else {
clicky_off();
}
}
}

Expand Down

0 comments on commit 246d539

Please sign in to comment.