]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Keymap: add clicky support to jetpacktuxedo keymap (#3990)
authorEthan Madden <crazeh.monkeh@gmail.com>
Fri, 28 Sep 2018 01:09:23 +0000 (18:09 -0700)
committerDrashna Jaelre <drashna@live.com>
Fri, 28 Sep 2018 01:09:23 +0000 (18:09 -0700)
controlled by dip 3 with pitch modulated by the knob

keyboards/planck/keymaps/jetpacktuxedo/config.h
keyboards/planck/keymaps/jetpacktuxedo/keymap.c

index f216dc02dcd44734a6a48d841edba4bf2722c43e..7efe97a57371a81e18e1ee1b051e6b391815059b 100644 (file)
@@ -2,6 +2,7 @@
 
 #ifdef AUDIO_ENABLE
     #define STARTUP_SONG SONG(PLANCK_SOUND)
+    #define AUDIO_CLICKY
 #endif
 
 /*
@@ -30,3 +31,4 @@
 
 // Most tactile encoders have detents every 4 stages
 #define ENCODER_RESOLUTION 4
+
index 2994c0c077498e7686785ff7eddeb391a193ea6c..1324056862652225ea1b4a80bc1aaad71855296c 100644 (file)
@@ -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) {
@@ -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();
+      }
    }
 }