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

Fix broken build for users/curry #16492

Merged
merged 1 commit into from
Apr 19, 2022
Merged
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
6 changes: 6 additions & 0 deletions keyboards/crkbd/keymaps/curry/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@
# define RGB_MATRIX_VAL_STEP 5
# define RGB_MATRIX_SPD_STEP 10
#endif

// comment out unnecessary layouts
#define ENABLE_QWERTY
#define ENABLE_COLEMAK
#define ENABLE_DVORAK
#define ENABLE_WORKMAN
8 changes: 8 additions & 0 deletions keyboards/crkbd/keymaps/curry/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,37 @@
#define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__)

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#if defined(ENABLE_QWERTY)
[_QWERTY] = LAYOUT_crkbd_base_wrapper(
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
),
#endif

#if defined(ENABLE_COLEMAK)
[_COLEMAK] = LAYOUT_crkbd_base_wrapper(
_________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
_________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
_________________COLEMAK_L3________________, _________________COLEMAK_R3________________
),
#endif

#if defined(ENABLE_DVORAK)
[_DVORAK] = LAYOUT_crkbd_base_wrapper(
_________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
_________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
),
#endif

#if defined(ENABLE_WORKMAN)
[_WORKMAN] = LAYOUT_crkbd_base_wrapper(
_________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
_________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
_________________WORKMAN_L3________________, _________________WORKMAN_R3________________
),
#endif

[_MODS] = LAYOUT_wrapper(
_______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
Expand Down
5 changes: 5 additions & 0 deletions keyboards/lily58/keymaps/curry/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@
# define RGBLIGHT_VAL_STEP 5
# define RGBLIGHT_LIMIT_VAL 120
#endif

// comment out unnecessary layouts
#define ENABLE_QWERTY
#define ENABLE_COLEMAK
#define ENABLE_DVORAK
6 changes: 6 additions & 0 deletions keyboards/lily58/keymaps/curry/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,32 @@
#define LAYOUT_lily58_base_wrapper(...) LAYOUT_lily58_base(__VA_ARGS__)

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#if defined(ENABLE_QWERTY)
[_QWERTY] = LAYOUT_lily58_base_wrapper(
________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________,
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
),
#endif

#if defined(ENABLE_COLEMAK)
[_COLEMAK] = LAYOUT_lily58_base_wrapper(
________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________,
_________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
_________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
_________________COLEMAK_L3________________, _________________COLEMAK_R3________________
),
#endif

#if defined(ENABLE_DVORAK)
[_DVORAK] = LAYOUT_lily58_base_wrapper(
________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________,
_________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
_________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
),
#endif

[_MODS] = LAYOUT_wrapper(
_______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
Expand Down
7 changes: 7 additions & 0 deletions keyboards/montsinger/rebound/rev1/keymaps/curry/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#pragma once

// comment out unnecessary layouts
#define ENABLE_QWERTY
#define ENABLE_COLEMAK
#define ENABLE_DVORAK
#define ENABLE_WORKMAN
8 changes: 8 additions & 0 deletions keyboards/montsinger/rebound/rev1/keymaps/curry/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,37 @@
#define LAYOUT_rebound_base_wrapper(...) LAYOUT_rebound_base(__VA_ARGS__)

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#if defined(ENABLE_QWERTY)
[_QWERTY] = LAYOUT_rebound_base_wrapper(
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
),
#endif

#if defined(ENABLE_COLEMAK)
[_COLEMAK] = LAYOUT_rebound_base_wrapper(
_________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
_________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
_________________COLEMAK_L3________________, _________________COLEMAK_R3________________
),
#endif

#if defined(ENABLE_DVORAK)
[_DVORAK] = LAYOUT_rebound_base_wrapper(
_________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
_________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
),
#endif

#if defined(ENABLE_WORKMAN)
[_WORKMAN] = LAYOUT_rebound_base_wrapper(
_________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
_________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
_________________WORKMAN_L3________________, _________________WORKMAN_R3________________
),
#endif

[_LOWER] = LAYOUT_ortho_4x12_wrapper(
KC_F11, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F12,
Expand Down
4 changes: 2 additions & 2 deletions users/curry/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN
// # undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
# undef ENABLE_RGB_MATRIX_DUAL_BEACON
# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
Expand All @@ -41,7 +41,7 @@
# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
# undef ENABLE_RGB_MATRIX_RAINDROPS
# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
// # undef ENABLE_RGB_MATRIX_TYPING_HEATMAP
# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN
# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE
# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
Expand Down
2 changes: 2 additions & 0 deletions users/curry/curry.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ void bootmagic_lite(void) {
wait_ms(30);
#endif
matrix_scan();
#if defined(BOOTMAGIC_ENABLE)
if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) {
bootloader_jump();
}
#endif
}

__attribute__((weak)) void keyboard_pre_init_keymap(void) {}
Expand Down
10 changes: 9 additions & 1 deletion users/curry/curry.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,18 @@

/* Define layer names */
enum userspace_layers {
_QWERTY = 0,
#if defined(ENABLE_QWERTY)
_QWERTY,
#endif
#if defined(ENABLE_COLEMAK)
_COLEMAK,
#endif
#if defined(ENABLE_DVORAK)
_DVORAK,
#endif
#if defined(ENABLE_WORKMAN)
_WORKMAN,
#endif
_MODS,
_LOWER,
_RAISE,
Expand Down
10 changes: 9 additions & 1 deletion users/curry/oled.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,26 @@ void render_keylogger_status(void) {
void render_default_layer_state(void) {
oled_write_P(PSTR("Lyout"), false);
switch (get_highest_layer(default_layer_state)) {
#if defined(ENABLE_QWERTY)
case _QWERTY:
oled_write_P(PSTR(" QRTY"), false);
break;
#endif
#if defined(ENABLE_COLEMAK)
case _COLEMAK:
oled_write_P(PSTR(" COLE"), false);
break;
#endif
#if defined(ENABLE_DVORAK)
case _DVORAK:
oled_write_P(PSTR(" DVRK"), false);
break;
#endif
#if defined(ENABLE_WORKMAN)
case _WORKMAN:
oled_write_P(PSTR(" WRKM"), false);
break;
#endif
}
}

Expand Down Expand Up @@ -140,7 +148,7 @@ void render_status_secondary(void) {
bool oled_task_user(void) {
if (timer_elapsed32(oled_timer) > 30000) {
oled_off();
return;
return false;
}
#if !defined(SPLIT_KEYBOARD)
else {
Expand Down
21 changes: 18 additions & 3 deletions users/curry/process_records.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,24 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
#define KC_SEC5 KC_SECRET_5

#define QWERTY KC_QWERTY
#define DVORAK KC_DVORAK
#define COLEMAK KC_COLEMAK
#define WORKMAN KC_WORKMAN
#define DVORAK KC_NO
#define COLEMAK KC_NO
#define WORKMAN KC_NO

#if defined(ENABLE_DVORAK)
# undef DVORAK
# define DVORAK KC_DVORAK
#endif

#if defined(ENABLE_COLEMAK)
# undef COLEMAK
# define COLEMAK KC_COLEMAK
#endif

#if defined(ENABLE_WORKMAN)
# undef WORKMAN
# define WORKMAN KC_WORKMAN
#endif

#define KC_RST RESET

Expand Down
6 changes: 6 additions & 0 deletions users/curry/rgb_lighting_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,21 @@ layer_state_t layer_state_set_rgb(layer_state_t state) {
{
uint8_t mode = get_highest_layer(state) == _MODS ? RGBLIGHT_MODE_BREATHING : RGBLIGHT_MODE_STATIC_LIGHT;
switch (get_highest_layer(default_layer_state)) {
#if defined(ENABLE_COLEMAK)
case _COLEMAK:
rgblight_set_hsv_and_mode(HSV_MAGENTA, mode);
break;
#endif
#if defined(ENABLE_DVORAK)
case _DVORAK:
rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, mode);
break;
#endif
#if defined(ENABLE_WORKMAN)
case _WORKMAN:
rgblight_set_hsv_and_mode(HSV_GOLDENROD, mode);
break;
#endif
default:
rgblight_set_hsv_and_mode(HSV_CYAN, mode);
break;
Expand Down
12 changes: 10 additions & 2 deletions users/curry/rgb_matrix_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,31 @@ void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); }

void check_default_layer(uint8_t mode, uint8_t type) {
switch (get_highest_layer(default_layer_state)) {
#if defined(ENABLE_QWERTY)
case _QWERTY:
rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type);
break;
#endif
#if defined(ENABLE_COLEMAK)
case _COLEMAK:
rgb_matrix_layer_helper(HSV_MAGENTA, mode, rgb_matrix_config.speed, type);
break;
#endif
#if defined(ENABLE_DVORAK)
case _DVORAK:
rgb_matrix_layer_helper(HSV_SPRINGGREEN, mode, rgb_matrix_config.speed, type);
break;
#endif
#if defined(ENABLE_WORKMAN)
case _WORKMAN:
rgb_matrix_layer_helper(HSV_GOLDENROD, mode, rgb_matrix_config.speed, type);
break;
#endif
}
}

void rgb_matrix_indicators_user(void) {
if (userspace_config.rgb_layer_change && !g_suspend_state && rgb_matrix_config.enable) {
if (userspace_config.rgb_layer_change && rgb_matrix_config.enable) {
switch (get_highest_layer(layer_state)) {
case _RAISE:
rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
Expand Down Expand Up @@ -120,7 +128,7 @@ void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode
switch (mode) {
case 1: // breathing
{
uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8);
uint16_t time = scale16by8(RGBLED_NUM, speed / 8);
hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
RGB rgb = hsv_to_rgb(hsv);
for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) {
Expand Down