Skip to content

Commit d7fb5cb

Browse files
drashnanhongooi
authored andcommitted
[Keymap] Drashna keymap fixups (qmk#14140)
1 parent f82fab1 commit d7fb5cb

File tree

7 files changed

+21
-27
lines changed

7 files changed

+21
-27
lines changed

keyboards/handwired/tractyl_manuform/5x6_right/config.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
5050
//#define NO_ACTION_ONESHOT
5151
#define NO_ACTION_MACRO
5252
#define NO_ACTION_FUNCTION
53-
54-
/* PMW3360 Settings */
55-
#define PMW3360_CS_PIN B0

keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
9191
// #define EXTERNAL_EEPROM_BYTE_COUNT 8196
9292
// #define EXTERNAL_EEPROM_PAGE_SIZE 32
9393
// #define EXTERNAL_EEPROM_ADDRESS_SIZE 2
94-
#define DEBUG_EEPROM_OUTPUT
94+
// #define DEBUG_EEPROM_OUTPUT
9595

96-
#define PMW_CS_PIN B0
97-
#define SPI_MODE 0
98-
#define SPI_DIVISOR 64
96+
#define PMW3360_CS_PIN B0

keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
3434
#define RGBLIGHT_SPLIT
3535
#define RGBLED_SPLIT \
3636
{ 10, 10 }
37+
#define RGBLIGHT_LIMIT_VAL 80
3738

3839
#define DEBUG_LED_PIN D6
3940

@@ -48,3 +49,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
4849
{ D5 }
4950
#define ENCODERS_PAD_B \
5051
{ D4 }
52+
53+
/* PMW3360 Settings */
54+
#define PMW3360_CS_PIN B0

layouts/community/ortho_4x12/drashna/keymap.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,12 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
215215
uint8_t this_mod = get_mods();
216216
uint8_t this_led = host_keyboard_leds();
217217
uint8_t this_osm = get_oneshot_mods();
218-
bool is_ez;
219218
# ifdef KEYBOARD_planck_ez
220-
is_ez = true;
219+
# define THUMB_LED 41
220+
# else
221+
# define THUMB_LED 42
221222
# endif
222-
223+
# define RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(...) RGB_MATRIX_INDICATOR_SET_COLOR(__VA_ARGS__)
223224
# if defined(RGBLIGHT_ENABLE)
224225
if (!userspace_config.rgb_layer_change)
225226
# else
@@ -265,16 +266,16 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
265266

266267
switch (get_highest_layer(default_layer_state)) {
267268
case _DEFAULT_LAYER_1:
268-
RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0x00, 0xFF, 0xFF);
269+
RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_1_RGB);
269270
break;
270271
case _DEFAULT_LAYER_2:
271-
RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0xFF, 0x00, 0xFF);
272+
RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_2_RGB);
272273
break;
273274
case _DEFAULT_LAYER_3:
274-
RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0x00, 0xFF, 0x00);
275+
RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_3_RGB);
275276
break;
276277
case _DEFAULT_LAYER_4:
277-
RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0xD9, 0xA5, 0x21);
278+
RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_4_RGB);
278279
break;
279280
}
280281

users/drashna/drashna.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ layer_state_t layer_state_set_user(layer_state_t state) {
172172
return state;
173173
}
174174

175-
state = layer_state_set_keymap(state);
176175
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
177176
#if defined(RGBLIGHT_ENABLE)
178177
state = layer_state_set_rgb_light(state);
@@ -188,6 +187,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
188187
}
189188
}
190189
#endif
190+
state = layer_state_set_keymap(state);
191191
return state;
192192
}
193193

users/drashna/drashna.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,15 @@ enum userspace_layers {
7676
#endif
7777

7878
#define DEFAULT_LAYER_1_HSV HSV_CYAN
79-
#define DEFAULT_LAYER_2_HSV HSV_SPRINGGREEN
79+
#define DEFAULT_LAYER_2_HSV HSV_CHARTREUSE
8080
#define DEFAULT_LAYER_3_HSV HSV_MAGENTA
8181
#define DEFAULT_LAYER_4_HSV HSV_GOLDENROD
8282

83+
#define DEFAULT_LAYER_1_RGB RGB_CYAN
84+
#define DEFAULT_LAYER_2_RGB RGB_CHARTREUSE
85+
#define DEFAULT_LAYER_3_RGB RGB_MAGENTA
86+
#define DEFAULT_LAYER_4_RGB RGB_GOLDENROD
87+
8388
bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed);
8489
bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
8590
void matrix_init_keymap(void);

users/drashna/transport_sync.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ void keyboard_post_init_transport_sync(void) {
7171

7272
void user_transport_update(void) {
7373
if (is_keyboard_master()) {
74-
# ifdef OLED_ENABLE
75-
user_state.oled_on = is_oled_on();
76-
# endif
77-
7874
transport_keymap_config = keymap_config.raw;
7975
transport_userspace_config = userspace_config.raw;
8076
#ifdef AUDIO_ENABLE
@@ -89,13 +85,6 @@ void user_transport_update(void) {
8985
#endif
9086

9187
} else {
92-
# ifdef OLED_ENABLE
93-
if (user_state.oled_on) {
94-
oled_on();
95-
} else {
96-
oled_off();
97-
}
98-
# endif
9988
keymap_config.raw = transport_keymap_config;
10089
userspace_config.raw = transport_userspace_config;
10190
#ifdef UNICODE_ENABLE

0 commit comments

Comments
 (0)