Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Develop - void DIP switch usage #13598

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions keyboards/manyboard/macro/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_4x4(
KC_F1, KC_F2, KC_F3, KC_F4,
KC_F5, KC_F6, KC_F7, KC_F8,
KC_F9, KC_F10, KC_F11, KC_F12,
[0] = LAYOUT_ortho_4x4(
KC_F1, KC_F2, KC_F3, KC_F4,
KC_F5, KC_F6, KC_F7, KC_F8,
KC_F9, KC_F10, KC_F11, KC_F12,
KC_F13, KC_F14, KC_F15, TO(1)
),
[1] = LAYOUT_ortho_4x4(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
[1] = LAYOUT_ortho_4x4(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, TO(2)
),
[2] = LAYOUT_ortho_4x4(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
[2] = LAYOUT_ortho_4x4(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, TO(0)
),
};
Expand All @@ -55,7 +55,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return state;
}

void encoder_update_user(uint8_t index, bool clockwise) {
bool encoder_update_user(uint8_t index, bool clockwise) {
/* With an if statement we can check which encoder was turned. */
if (index == 0) { /* First encoder */
/* And with another if statement we can check the direction. */
Expand All @@ -69,5 +69,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
/* And likewise for the other direction, this time Vol Down is pressed. */
tap_code(KC_AUDIO_VOL_DOWN);
}
}
}
return true;
}
29 changes: 15 additions & 14 deletions keyboards/manyboard/macro/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_4x4(
KC_F1, KC_F2, KC_F3, KC_F4,
KC_F5, KC_F6, KC_F7, KC_F8,
KC_F9, KC_F10, KC_F11, KC_F12,
[0] = LAYOUT_ortho_4x4(
KC_F1, KC_F2, KC_F3, KC_F4,
KC_F5, KC_F6, KC_F7, KC_F8,
KC_F9, KC_F10, KC_F11, KC_F12,
KC_F13, KC_F14, KC_F15, TO(1)
),
[1] = LAYOUT_ortho_4x4(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
[1] = LAYOUT_ortho_4x4(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, TO(2)
),
[2] = LAYOUT_ortho_4x4(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
[2] = LAYOUT_ortho_4x4(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, TO(0)
),
};
Expand All @@ -54,7 +54,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return state;
}

void encoder_update_user(uint8_t index, bool clockwise) {
bool encoder_update_user(uint8_t index, bool clockwise) {
/* With an if statement we can check which encoder was turned. */
if (index == 0) { /* First encoder */
/* And with another if statement we can check the direction. */
Expand All @@ -68,5 +68,6 @@ void encoder_update_user(uint8_t index, bool clockwise) {
/* And likewise for the other direction, this time Vol Down is pressed. */
tap_code(KC_AUDIO_VOL_DOWN);
}
}
}
return true;
}
3 changes: 2 additions & 1 deletion keyboards/pearlboards/pandora/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
// Encoder click function
void dip_switch_update_user(uint8_t index, bool active) {
bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
/* First encoder */
case 0:
Expand All @@ -80,4 +80,5 @@ void dip_switch_update_user(uint8_t index, bool active) {
}
break;
}
return true;
}
3 changes: 2 additions & 1 deletion keyboards/pearlboards/pandora/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
// Encoder click function
void dip_switch_update_user(uint8_t index, bool active) {
bool dip_switch_update_user(uint8_t index, bool active) {
switch (index) {
/* First encoder */
case 0:
Expand All @@ -94,4 +94,5 @@ void dip_switch_update_user(uint8_t index, bool active) {
}
break;
}
return true;
}