From 679e73bc695b6e741a621bbe0f4029d4cac8e0b3 Mon Sep 17 00:00:00 2001 From: Perry Wang <7255333+perrwa@users.noreply.github.com> Date: Fri, 10 Apr 2026 16:55:44 -0700 Subject: [PATCH 1/3] feat: switch dongle board to CX40 (raytac_mdbt50q_cx_40) Swap board from raytac_mdbt50q_rx to raytac_mdbt50q_cx_40 and point zmk-component-raytac-dongle to perrwa fork with CX40 support. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- build.yaml | 4 ++-- config/west.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build.yaml b/build.yaml index 414c9c2..c5d0240 100644 --- a/build.yaml +++ b/build.yaml @@ -3,9 +3,9 @@ include: - board: nice_nano_v2 shield: settings_reset - - board: raytac_mdbt50q_rx + - board: raytac_mdbt50q_cx_40 shield: corne_dongle - - board: raytac_mdbt50q_rx + - board: raytac_mdbt50q_cx_40 shield: settings_reset # Dongle setup: both halves are peripherals (dongle is central) diff --git a/config/west.yml b/config/west.yml index efb5611..45b74e7 100644 --- a/config/west.yml +++ b/config/west.yml @@ -2,15 +2,15 @@ manifest: remotes: - name: zmkfirmware url-base: https://github.com/zmkfirmware - - name: rschenk - url-base: https://github.com/rschenk + - name: perrwa + url-base: https://github.com/perrwa projects: - name: zmk remote: zmkfirmware revision: v0.3 import: app/west.yml - name: zmk-component-raytac-dongle - remote: rschenk - revision: v0.3 + remote: perrwa + revision: perrwa/add-cx40 self: path: config From 8a6456f779e71bb3ad22723704033f5c5fee1d70 Mon Sep 17 00:00:00 2001 From: Perry Wang <7255333+perrwa@users.noreply.github.com> Date: Sun, 12 Apr 2026 20:32:49 -0700 Subject: [PATCH 2/3] fix: point dongle component to zmk03-compatible branch Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- config/west.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/west.yml b/config/west.yml index 45b74e7..4ad6586 100644 --- a/config/west.yml +++ b/config/west.yml @@ -11,6 +11,6 @@ manifest: import: app/west.yml - name: zmk-component-raytac-dongle remote: perrwa - revision: perrwa/add-cx40 + revision: perrwa/add-cx40-zmk03 self: path: config From 60938a4245e3a3137c6a8f04a71ca7cfc0ff94bc Mon Sep 17 00:00:00 2001 From: Perry Wang <7255333+perrwa@users.noreply.github.com> Date: Tue, 19 May 2026 20:02:27 -0700 Subject: [PATCH 3/3] Enhance documentation and configuration for Bluetooth settings (#30) * docs: improve copilot instructions from session history (#24) Add workflow trigger details, GitHub Actions gotchas (timeout-minutes on reusable workflows, paths-ignore vs required checks), multi-board context (RX vs CX40), ZMK build system config resolution, and strengthened fork context to prevent targeting upstream repos. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore: increase BT_MAX_CONN and BT_MAX_PAIRED to 5 (#28) * Disable RGB underglow, backlight, and WS2812 strip driver (#29) Agent-Logs-Url: https://github.com/perrwa/zmk-config/sessions/e43c390b-9f66-4192-8abf-fa998ef63b86 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: perrwa <7255333+perrwa@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> --- .github/copilot-instructions.md | 26 +++++++++++++++++-- boards/shields/corne_dongle/corne_dongle.conf | 4 +-- config/corne.conf | 7 +++++ 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 8cb155a..2ef3b7b 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -4,10 +4,22 @@ Split Corne-Cherry v3.0.1 ZMK keyboard config. Nice!Nano v2 halves + Raytac MDBT ## Build -No local build/test. Two GitHub Actions workflows: `build.yml` (CI on PRs + manual dispatch) and `release.yml` (tag push `v*` + manual dispatch — builds firmware then creates a draft prerelease). Both call ZMK's reusable workflow. `build.yaml` defines the build matrix. Dongle halves override central role: `cmake-args: -DCONFIG_ZMK_SPLIT_ROLE_CENTRAL=n`. +No local build/test. Three GitHub Actions workflows: + +- `build.yml` — CI on PRs to main + manual dispatch. Has a `check-changes` gate using `dorny/paths-filter` so the build job only runs when firmware-relevant files change (`config/`, `boards/`, `build.yaml`, `zephyr/`, `build.yml`). The `build-result` gate job always reports a status so required checks pass even when build is skipped. +- `release.yml` — tag push `v*` + manual dispatch. Builds firmware then creates a draft prerelease. Uses `paths-ignore` for keymap-drawer files. +- `draw-keymaps-unified.yml` — push to main + PRs targeting main + manual dispatch. Only triggers on keymap-relevant path changes (`config/*.keymap`, `config/*.dtsi`, `keymap_drawer.config.yaml`, `keymap-drawer/merge_layers.py`). On main: opens a PR via `peter-evans/create-pull-request`. On branches: auto-commits via `stefanzweifel/git-auto-commit-action`. + +All build/release workflows call ZMK's reusable workflow (`zmkfirmware/zmk/.github/workflows/build-user-config.yml`). `build.yaml` defines the build matrix. Dongle halves override central role: `cmake-args: -DCONFIG_ZMK_SPLIT_ROLE_CENTRAL=n`. `make dfu` packages firmware for dongle flashing; `make flash` flashes interactively via serial. Requires `nrfutil nrf5sdk-tools`. +### GitHub Actions Gotchas + +- `timeout-minutes` is NOT valid on jobs that call reusable workflows via `uses:`. Only jobs with `runs-on` + `steps` support it. GitHub fails the entire workflow run at validation with no useful error message. +- When `paths-ignore` causes a workflow to skip entirely, required status checks never report — blocking PR merges. Use `dorny/paths-filter` inside the workflow instead, so the check always reports (as passed/skipped). +- `peter-evans/create-pull-request@v7` has built-in no-change detection — it won't create a PR or push if the working tree is clean. No need for explicit guards. + ## Keymap `config/corne.keymap` — Devicetree syntax, 4 layers: 0=QWERTY base, 1=symbols/F-keys, 2=nav/media, 3=numpad. Thumbs use `&mt` (mod-tap) and `<` (layer-tap). Layer access: hold Space→L1, hold Esc→L2, `&mo 3` from L1/L2. @@ -18,7 +30,13 @@ Each layer has QMK-style comment blocks above `bindings` showing visual layout ## Fork Context -This repo is Perry's fork (`perrwa/zmk-config`). The dongle board component comes from `rschenk/zmk-component-raytac-dongle` — Perry's fork is `perrwa/zmk-component-raytac-dongle`. Always target the fork for issues, PRs, and pushes unless explicitly told to work on upstream. +This repo is Perry's fork (`perrwa/zmk-config`). Always target the fork for issues, PRs, and pushes unless explicitly told to work on upstream. + +The dongle board component comes from `rschenk/zmk-component-raytac-dongle` — Perry's fork is `perrwa/zmk-component-raytac-dongle`. When creating issues or PRs for the dongle board, always use `perrwa/zmk-component-raytac-dongle`, not rschenk's upstream. Double-check the `--repo` flag on `gh` commands — the CLI may default to upstream if the local clone's `origin` points there. + +### Multi-Board Context + +`main` builds the **RX** dongle variant (`mdbt50q_rx` via `rschenk/zmk-component-raytac-dongle`). **CX40** dongle work lives on feature branches with a modified `config/west.yml` pointing to the CX40 board component (`perrwa/zmk-component-raytac-dongle`). Don't assume feature branches targeting CX40 have been integrated into main — they are separate hardware targets. ## Dongle BLE @@ -27,3 +45,7 @@ This repo is Perry's fork (`perrwa/zmk-config`). The dongle board component come ## Testing Changes There is no local ZMK toolchain. To test changes, push the branch and watch GitHub Actions: `gh run watch` or check the Actions tab. Debug CI failures by reading job logs with `gh run view --log-failed`. + +## ZMK Build System + +Board-specific defconfig and DTS changes must go in the board component module (`perrwa/zmk-component-raytac-dongle`), not in `config/boards/` within zmk-config. ZMK's reusable build workflow passes `-DZMK_CONFIG=/tmp/zmk-config/config` — board `.conf` file resolution follows Zephyr's rules for west modules, not the zmk-config `config/` directory. diff --git a/boards/shields/corne_dongle/corne_dongle.conf b/boards/shields/corne_dongle/corne_dongle.conf index e32df6a..374c283 100644 --- a/boards/shields/corne_dongle/corne_dongle.conf +++ b/boards/shields/corne_dongle/corne_dongle.conf @@ -14,8 +14,8 @@ CONFIG_ZMK_SPLIT_ROLE_CENTRAL=y # Set BT_MAX_CONN to ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS + desired BT profiles (default 5) # BT_MAX_CONN and BT_MAX_PAIRED should match CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2 -CONFIG_BT_MAX_CONN=3 -CONFIG_BT_MAX_PAIRED=3 +CONFIG_BT_MAX_CONN=5 +CONFIG_BT_MAX_PAIRED=5 # Enable battery level fetching and proxying for split BLE central peripherals CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_PROXY=y diff --git a/config/corne.conf b/config/corne.conf index aaf0e6f..8967076 100644 --- a/config/corne.conf +++ b/config/corne.conf @@ -3,6 +3,13 @@ CONFIG_ZMK_SLEEP=y # 1800000 ms = 30 minutes (default is 15 min) CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000 +# Disable RGB underglow, backlight, and WS2812 driver to eliminate +# ~12 mA quiescent draw from soldered SMT LEDs (even when "off"). +# VCC to the LED rail is gated via ext_power EP_OFF on the nice!nano v2. +CONFIG_ZMK_RGB_UNDERGLOW=n +CONFIG_ZMK_BACKLIGHT=n +CONFIG_WS2812_STRIP=n + CONFIG_ZMK_BATTERY_REPORTING=y # Disable 2M PHY for better interference resistance near 2.4 GHz devices