Make default layer size 16-bit (#15286)

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
This commit is contained in:
Drashna Jaelre 2022-06-18 14:37:51 -07:00 committed by GitHub
parent 8934dc35bc
commit 4cb66426fc
4 changed files with 5 additions and 5 deletions

View file

@ -118,7 +118,7 @@ void keyboard_post_init_user(void) {
#ifdef RGB_MATRIX_ENABLE #ifdef RGB_MATRIX_ENABLE
void rgb_matrix_indicators_user(void) { void rgb_matrix_indicators_user(void) {
if (rgb_matrix_is_enabled()) { // turn the lights on when it is enabled. if (rgb_matrix_is_enabled()) { // turn the lights on when it is enabled.
uint8_t layer = biton32(layer_state); uint8_t layer = get_highest_layer(layer_state);
switch (layer) { switch (layer) {
case _CLOSE: case _CLOSE:
// rgb_matrix_set_color(pgm_read_byte(&convert_led_location2number[11]), RGB_RED); // RGB_TOG <- too heavy. // rgb_matrix_set_color(pgm_read_byte(&convert_led_location2number[11]), RGB_RED); // RGB_TOG <- too heavy.

View file

@ -87,7 +87,7 @@ void led_set_user(uint8_t usb_led) {
//function for layer indicator LED //function for layer indicator LED
layer_state_t layer_state_set_user(layer_state_t state) layer_state_t layer_state_set_user(layer_state_t state)
{ {
if (biton32(state) == 1) { if (get_highest_layer(state) == 1) {
writePinHigh(C6); writePinHigh(C6);
} else { } else {
writePinLow(C6); writePinLow(C6);

View file

@ -95,9 +95,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
bool encoder_update_user(uint8_t index, bool clockwise) { bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { if (index == 0) {
if (clockwise) { if (clockwise) {
tap_code(dynamic_keymap_get_keycode(biton32(layer_state), 4, 3)); tap_code(dynamic_keymap_get_keycode(get_highest_layer(layer_state), 4, 3));
} else { } else {
tap_code(dynamic_keymap_get_keycode(biton32(layer_state), 4, 4)); tap_code(dynamic_keymap_get_keycode(get_highest_layer(layer_state), 4, 4));
} }
} }
return true; return true;

View file

@ -108,7 +108,7 @@ void led_set_user(uint8_t usb_led) {
//function for layer indicator LED //function for layer indicator LED
layer_state_t layer_state_set_user(layer_state_t state) layer_state_t layer_state_set_user(layer_state_t state)
{ {
if (biton32(state) == 1) { if (get_highest_layer(state) == 1) {
writePinHigh(B3); writePinHigh(B3);
} else { } else {
writePinLow(B3); writePinLow(B3);