X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=common%2Fcommand.c;h=202d531fd83363a0f9e08a6c6e38d55a366a7a31;hb=5d6b848a157a2e94859949961297d40da6a77527;hp=c5b9f0431c9a0a6f4defb25b533f97d9ea0020cd;hpb=f8d289e66965f99469292370c3b9200a03254f8e;p=max%2Ftmk_keyboard.git diff --git a/common/command.c b/common/command.c index c5b9f043..202d531f 100644 --- a/common/command.c +++ b/common/command.c @@ -26,8 +26,8 @@ along with this program. If not, see . #include "timer.h" #include "keyboard.h" #include "bootloader.h" +#include "layer_switch.h" #include "command.h" -#include "layer_stack.h" #ifdef MOUSEKEY_ENABLE #include "mousekey.h" @@ -543,12 +543,8 @@ static uint8_t numkey2num(uint8_t code) static void switch_default_layer(uint8_t layer) { - print_val_hex8(current_layer); - print_val_hex8(default_layer); - print("switch to "); print_val_hex8(layer); - - default_layer = layer; - current_layer = 0; /* 0 means default_layer */ - layer_stack_clear(); + print("switch_default_layer: "); print_dec(default_layer); print(" to "); print_dec(layer); print("\n"); + default_layer_set(layer); + overlay_clear(); clear_keyboard(); }