summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-08-24 01:37:14 -0700
committerGitHub <noreply@github.com>2021-08-24 01:37:14 -0700
commitbc239cd52022ea7ca26310faa9ed98e3faa81cb6 (patch)
treefea0d67477102aafbbfcff46f4a761747ac169ae
parent4e1c5887c5c08ebd2cf7868c8d9292aa728e7bf0 (diff)
[Keymap] Drashna keymap fixups (#14140)
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/config.h3
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h6
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h4
-rw-r--r--layouts/community/ortho_4x12/drashna/keymap.c15
-rw-r--r--users/drashna/drashna.c2
-rw-r--r--users/drashna/drashna.h7
-rw-r--r--users/drashna/transport_sync.c11
7 files changed, 21 insertions, 27 deletions
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/config.h
index 5d75432aed..d1860c3378 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/config.h
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/config.h
@@ -50,6 +50,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_ONESHOT
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
-
-/* PMW3360 Settings */
-#define PMW3360_CS_PIN B0
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h
index d3e0598cd6..cc4efedb86 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h
@@ -91,8 +91,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define EXTERNAL_EEPROM_BYTE_COUNT 8196
// #define EXTERNAL_EEPROM_PAGE_SIZE 32
// #define EXTERNAL_EEPROM_ADDRESS_SIZE 2
-#define DEBUG_EEPROM_OUTPUT
+// #define DEBUG_EEPROM_OUTPUT
-#define PMW_CS_PIN B0
-#define SPI_MODE 0
-#define SPI_DIVISOR 64
+#define PMW3360_CS_PIN B0
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h
index 44a66750b9..2391020598 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h
@@ -34,6 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_SPLIT
#define RGBLED_SPLIT \
{ 10, 10 }
+#define RGBLIGHT_LIMIT_VAL 80
#define DEBUG_LED_PIN D6
@@ -48,3 +49,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ D5 }
#define ENCODERS_PAD_B \
{ D4 }
+
+/* PMW3360 Settings */
+#define PMW3360_CS_PIN B0
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c
index 9ef2317f44..cb3166c940 100644
--- a/layouts/community/ortho_4x12/drashna/keymap.c
+++ b/layouts/community/ortho_4x12/drashna/keymap.c
@@ -215,11 +215,12 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
uint8_t this_mod = get_mods();
uint8_t this_led = host_keyboard_leds();
uint8_t this_osm = get_oneshot_mods();
- bool is_ez;
# ifdef KEYBOARD_planck_ez
- is_ez = true;
+# define THUMB_LED 41
+# else
+# define THUMB_LED 42
# endif
-
+# define RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(...) RGB_MATRIX_INDICATOR_SET_COLOR(__VA_ARGS__)
# if defined(RGBLIGHT_ENABLE)
if (!userspace_config.rgb_layer_change)
# else
@@ -265,16 +266,16 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
switch (get_highest_layer(default_layer_state)) {
case _DEFAULT_LAYER_1:
- RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0x00, 0xFF, 0xFF);
+ RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_1_RGB);
break;
case _DEFAULT_LAYER_2:
- RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0xFF, 0x00, 0xFF);
+ RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_2_RGB);
break;
case _DEFAULT_LAYER_3:
- RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0x00, 0xFF, 0x00);
+ RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_3_RGB);
break;
case _DEFAULT_LAYER_4:
- RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0xD9, 0xA5, 0x21);
+ RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_4_RGB);
break;
}
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index 13421f39d7..3423e379a1 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -172,7 +172,6 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return state;
}
- state = layer_state_set_keymap(state);
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
#if defined(RGBLIGHT_ENABLE)
state = layer_state_set_rgb_light(state);
@@ -188,6 +187,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
}
}
#endif
+ state = layer_state_set_keymap(state);
return state;
}
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index a1fa3ffa92..af26fdc433 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -76,10 +76,15 @@ enum userspace_layers {
#endif
#define DEFAULT_LAYER_1_HSV HSV_CYAN
-#define DEFAULT_LAYER_2_HSV HSV_SPRINGGREEN
+#define DEFAULT_LAYER_2_HSV HSV_CHARTREUSE
#define DEFAULT_LAYER_3_HSV HSV_MAGENTA
#define DEFAULT_LAYER_4_HSV HSV_GOLDENROD
+#define DEFAULT_LAYER_1_RGB RGB_CYAN
+#define DEFAULT_LAYER_2_RGB RGB_CHARTREUSE
+#define DEFAULT_LAYER_3_RGB RGB_MAGENTA
+#define DEFAULT_LAYER_4_RGB RGB_GOLDENROD
+
bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed);
bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
void matrix_init_keymap(void);
diff --git a/users/drashna/transport_sync.c b/users/drashna/transport_sync.c
index 38434751e6..fdd596c04c 100644
--- a/users/drashna/transport_sync.c
+++ b/users/drashna/transport_sync.c
@@ -71,10 +71,6 @@ void keyboard_post_init_transport_sync(void) {
void user_transport_update(void) {
if (is_keyboard_master()) {
-# ifdef OLED_ENABLE
- user_state.oled_on = is_oled_on();
-# endif
-
transport_keymap_config = keymap_config.raw;
transport_userspace_config = userspace_config.raw;
#ifdef AUDIO_ENABLE
@@ -89,13 +85,6 @@ void user_transport_update(void) {
#endif
} else {
-# ifdef OLED_ENABLE
- if (user_state.oled_on) {
- oled_on();
- } else {
- oled_off();
- }
-# endif
keymap_config.raw = transport_keymap_config;
userspace_config.raw = transport_userspace_config;
#ifdef UNICODE_ENABLE