Keymap: add clicky support to jetpacktuxedo keymap (#3990)
controlled by dip 3 with pitch modulated by the knob
This commit is contained in:
		
							parent
							
								
									a65085a893
								
							
						
					
					
						commit
						246d539f29
					
				@ -2,6 +2,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#ifdef AUDIO_ENABLE
 | 
					#ifdef AUDIO_ENABLE
 | 
				
			||||||
    #define STARTUP_SONG SONG(PLANCK_SOUND)
 | 
					    #define STARTUP_SONG SONG(PLANCK_SOUND)
 | 
				
			||||||
 | 
					    #define AUDIO_CLICKY
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
@ -30,3 +31,4 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// Most tactile encoders have detents every 4 stages
 | 
					// Most tactile encoders have detents every 4 stages
 | 
				
			||||||
#define ENCODER_RESOLUTION 4
 | 
					#define ENCODER_RESOLUTION 4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -189,6 +189,13 @@ uint8_t muse_offset = 70;
 | 
				
			|||||||
uint16_t muse_tempo = 20;
 | 
					uint16_t muse_tempo = 20;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void encoder_update(bool clockwise) {
 | 
					void encoder_update(bool clockwise) {
 | 
				
			||||||
 | 
					  if (is_clicky_on()) {
 | 
				
			||||||
 | 
					    if (clockwise) {
 | 
				
			||||||
 | 
					      clicky_freq_up();
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					      clicky_freq_down();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  } else 
 | 
				
			||||||
  if (muse_mode) {
 | 
					  if (muse_mode) {
 | 
				
			||||||
    if (IS_LAYER_ON(_RAISE)) {
 | 
					    if (IS_LAYER_ON(_RAISE)) {
 | 
				
			||||||
      if (clockwise) {
 | 
					      if (clockwise) {
 | 
				
			||||||
@ -248,6 +255,12 @@ void dip_update(uint8_t index, bool active) {
 | 
				
			|||||||
          stop_all_notes();
 | 
					          stop_all_notes();
 | 
				
			||||||
        #endif
 | 
					        #endif
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					    case 2:
 | 
				
			||||||
 | 
					      if (active) {
 | 
				
			||||||
 | 
					        clicky_on();
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        clicky_off();
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user