From b5212cbba58ffe72751c57ebcc4b37dc0351a066 Mon Sep 17 00:00:00 2001 From: urob <978080+urob@users.noreply.github.com> Date: Fri, 9 Feb 2024 21:47:15 -0500 Subject: [PATCH] Upgrade to Zephyr 3.5 --- config/base.keymap | 6 +++--- config/corneish_zen.conf | 17 ++++------------- config/mouse.dtsi | 39 +++++++++------------------------------ config/planck_rev6.conf | 4 ---- config/west.yml | 2 +- scripts/zmk_build.sh | 2 +- scripts/zmk_run_docker.sh | 2 +- 7 files changed, 19 insertions(+), 53 deletions(-) diff --git a/config/base.keymap b/config/base.keymap index ba62c166a..91dac3ec2 100644 --- a/config/base.keymap +++ b/config/base.keymap @@ -297,13 +297,13 @@ ZMK_LAYER(uc, ZMK_LAYER(mouse, //╭──────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭──────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭──────╮ - X_LT ___ ___ ___ ___ ___ X_MT ___ U_WH_D U_MS_U U_WH_U ___ X_RT + X_LT ___ ___ ___ ___ ___ X_MT U_WH_L U_WH_D U_MS_U U_WH_U U_WH_R X_RT //├──────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├──────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├──────┤ X_LM ___ ___ ___ ___ ___ X_MM ___ U_MS_L U_MS_D U_MS_R ___ X_RM //├──────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├──────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├──────┤ - X_LB ___ ___ ___ ___ ___ X_MB ___ ___ ___ ___ ___ X_RB + X_LB ___ ___ ___ ___ ___ X_MB ___ &mkp MB4 &mkp MCLK &mkp MB5 ___ X_RB //├──────┤ ╰─────────────┼─────────────┴─────────────┼─────────────┼─────────────┤ ├──────┤ ├─────────────┼─────────────┼─────────────┴───────────────────────────╯ ├──────┤ - X_LH ___ ___ X_MH U_BTN2 U_BTN1 X_RH + X_LH ___ ___ X_MH &mkp LCLK &mkp RCLK X_RH //╰──────╯ ╰─────────────┴─────────────╯ ╰──────╯ ╰─────────────┴─────────────╯ ╰──────╯ ) diff --git a/config/corneish_zen.conf b/config/corneish_zen.conf index 6e73eb5bf..d5afb8042 100644 --- a/config/corneish_zen.conf +++ b/config/corneish_zen.conf @@ -7,21 +7,12 @@ CONFIG_ZMK_DISPLAY_FULL_REFRESH_PERIOD=300 CONFIG_ZMK_DISPLAY_HIDE_MOMENTARY_LAYERS=y CONFIG_CUSTOM_WIDGET_LAYER_STATUS_HIDE_HEADING=y -# Mouse config, requires PR #778 -CONFIG_ZMK_MOUSE=y -CONFIG_ZMK_MOUSE_TICK_DURATION=8 - # Combo config, automated by build script CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=6 CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=3 -# Windows battery reporting fix -# CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n - -# Clear all bluetooth bonds on start up -# CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START=y - -# Turn on logging -# CONFIG_ZMK_USB_LOGGING=y -# CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000 +# Bluetooth tweaks +CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y +CONFIG_BT_GATT_ENFORCE_SUBSCRIPTION=n +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y diff --git a/config/mouse.dtsi b/config/mouse.dtsi index cbc95853d..7f6cc9d7f 100644 --- a/config/mouse.dtsi +++ b/config/mouse.dtsi @@ -1,47 +1,26 @@ +#define ZMK_MOUSE_DEFAULT_MOVE_VAL 1500 // 600 +#define ZMK_MOUSE_DEFAULT_SCRL_VAL 20 // 10 + #include &mmv { acceleration-exponent = <1>; // 1 - time-to-max-speed-ms = <1500>; // 40 + time-to-max-speed-ms = <500>; // 40 delay-ms = <0>; // 0 }; &msc { acceleration-exponent = <1>; // 0 - time-to-max-speed-ms = <5000>; // 40 + time-to-max-speed-ms = <40>; // 500 delay-ms = <0>; // 10 }; -#define U_MOUSE_MOVE_MAX 1250 // 600 -#define U_MOUSE_SCROLL_MAX 100 // 10 - -#undef MOVE_UP -#undef MOVE_DOWN -#undef MOVE_LEFT -#undef MOVE_RIGHT -#define MOVE_UP MOVE_Y(-U_MOUSE_MOVE_MAX) -#define MOVE_DOWN MOVE_Y(U_MOUSE_MOVE_MAX) -#define MOVE_LEFT MOVE_X(-U_MOUSE_MOVE_MAX) -#define MOVE_RIGHT MOVE_X(U_MOUSE_MOVE_MAX) - -#undef SCROLL_UP -#undef SCROLL_DOWN -#undef SCROLL_LEFT -#undef SCROLL_RIGHT -#define SCROLL_UP SCRL_Y(U_MOUSE_SCROLL_MAX) -#define SCROLL_DOWN SCRL_Y(-U_MOUSE_SCROLL_MAX) -#define SCROLL_LEFT SCRL_X(-U_MOUSE_SCROLL_MAX) -#define SCROLL_RIGHT SCRL_X(U_MOUSE_SCROLL_MAX) - -#define U_BTN1 &mkp MB1 -#define U_BTN2 &mkp MB2 -#define U_BTN3 &mkp MB3 #define U_MS_U &mmv MOVE_UP #define U_MS_D &mmv MOVE_DOWN #define U_MS_L &mmv MOVE_LEFT #define U_MS_R &mmv MOVE_RIGHT -#define U_WH_U &msc SCROLL_UP -#define U_WH_D &msc SCROLL_DOWN -#define U_WH_L &msc SCROLL_LEFT -#define U_WH_R &msc SCROLL_RIGHT +#define U_WH_U &msc SCRL_UP +#define U_WH_D &msc SCRL_DOWN +#define U_WH_L &msc SCRL_LEFT +#define U_WH_R &msc SCRL_RIGHT diff --git a/config/planck_rev6.conf b/config/planck_rev6.conf index 266116f95..ef69e7534 100644 --- a/config/planck_rev6.conf +++ b/config/planck_rev6.conf @@ -1,9 +1,5 @@ CONFIG_ZMK_KEYBOARD_NAME="Planck Rev6" -# Mouse config, requires PR #778 -CONFIG_ZMK_MOUSE=y -CONFIG_ZMK_MOUSE_TICK_DURATION=8 - # Combo config, automated by build script CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=6 CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=3 diff --git a/config/west.yml b/config/west.yml index 3c2555659..bfee2ba4f 100644 --- a/config/west.yml +++ b/config/west.yml @@ -7,7 +7,7 @@ manifest: projects: - name: zmk remote: urob - revision: main-with-native-mouse + revision: main import: app/west.yml self: path: config diff --git a/scripts/zmk_build.sh b/scripts/zmk_build.sh index 332f394e5..e6438e4fc 100755 --- a/scripts/zmk_build.sh +++ b/scripts/zmk_build.sh @@ -77,7 +77,7 @@ while [[ $# -gt 0 ]]; do done # Set defaults -[[ -z $ZEPHYR_VERSION ]] && ZEPHYR_VERSION="3.2" +[[ -z $ZEPHYR_VERSION ]] && ZEPHYR_VERSION="3.5" [[ -z $RUNWITH_DOCKER ]] && RUNWITH_DOCKER="true" [[ -z $OUTPUT_DIR ]] && OUTPUT_DIR="$WINHOME/Downloads" diff --git a/scripts/zmk_run_docker.sh b/scripts/zmk_run_docker.sh index 9435c777d..1c65e9cae 100755 --- a/scripts/zmk_run_docker.sh +++ b/scripts/zmk_run_docker.sh @@ -55,7 +55,7 @@ while [[ $# -gt 0 ]]; do done # Set defaults -[[ -z $ZEPHYR_VERSION ]] && ZEPHYR_VERSION="3.0" +[[ -z $ZEPHYR_VERSION ]] && ZEPHYR_VERSION="3.5" [[ -z $HOST_ZMK_DIR ]] && HOST_ZMK_DIR="$HOME/zmk" [[ -z $HOST_CONFIG_DIR ]] && HOST_CONFIG_DIR="$HOME/zmk-config"