Convert Encoder callbacks to be boolean functions (#12805)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									76c23b15ab
								
							
						
					
					
						commit
						a0fed0ea17
					
				
					 437 changed files with 2542 additions and 2135 deletions
				
			
		| 
						 | 
				
			
			@ -51,16 +51,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		|||
),
 | 
			
		||||
 | 
			
		||||
[_RAISE] = LAYOUT_planck_grid( /* Right */
 | 
			
		||||
  KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC, 
 | 
			
		||||
  KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_BSPC,
 | 
			
		||||
  KC_DEL, _______, _______, _______, _______, _______,                    _______, KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_BSLS,
 | 
			
		||||
  _______, _______, _______, _______, _______, _______,                   _______, KC_UNDS, KC_PLUS,  KC_LCBR, KC_RCBR, KC_PIPE, 
 | 
			
		||||
  _______, _______, _______, _______, _______, _______,                   _______, KC_UNDS, KC_PLUS,  KC_LCBR, KC_RCBR, KC_PIPE,
 | 
			
		||||
  _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
 | 
			
		||||
),
 | 
			
		||||
 | 
			
		||||
[_LOWER] = LAYOUT_planck_grid( /* Left */
 | 
			
		||||
  KC_TILDE,  KC_EXCLAIM,  KC_AT,  KC_HASH,  KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_BSPC,
 | 
			
		||||
  KC_DEL, _______, _______, _______, _______, _______,                      _______, KC_UNDS, KC_PLUS,  KC_LCBR, KC_RCBR, KC_BSLS,
 | 
			
		||||
  _______, _______, _______, _______, _______, _______,                     _______, KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_TILD, 
 | 
			
		||||
  _______, _______, _______, _______, _______, _______,                     _______, KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_TILD,
 | 
			
		||||
  _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
 | 
			
		||||
),
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -89,7 +89,7 @@ uint16_t muse_counter = 0;
 | 
			
		|||
uint8_t muse_offset = 70;
 | 
			
		||||
uint16_t muse_tempo = 50;
 | 
			
		||||
 | 
			
		||||
void encoder_update(bool clockwise) {
 | 
			
		||||
bool encoder_update(bool clockwise) {
 | 
			
		||||
  if (muse_mode) {
 | 
			
		||||
    if (IS_LAYER_ON(_RAISE)) {
 | 
			
		||||
      if (clockwise) {
 | 
			
		||||
| 
						 | 
				
			
			@ -119,6 +119,7 @@ void encoder_update(bool clockwise) {
 | 
			
		|||
      #endif
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void dip_switch_update_user(uint8_t index, bool active) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue