Skip to content

Added support for 2% Milk shield.#684

Closed
aaron-nunley wants to merge 2 commits intozmkfirmware:mainfrom
aaron-nunley:two_percent_milk
Closed

Added support for 2% Milk shield.#684
aaron-nunley wants to merge 2 commits intozmkfirmware:mainfrom
aaron-nunley:two_percent_milk

Conversation

@aaron-nunley
Copy link
Copy Markdown
Contributor

This adds support for the 2% Milk from Spaceman.

The shield is driven via a nice!nano. Works like a charm. Tested on macOS 11.1 (20C69) running on an M1 Mac Mini.

The shield has three-pin LED support but I don't have any hardware to test with and didn't add LED support for the driver. I can mark that as a todo in the overlay source if it's pertinent.

Here's a log of pressing and releasing each key:

[00:13:21.169,006] <dbg> zmk.position_state_changed_listener: 0 bubble (no undecided hold_tap active)
[00:13:21.169,006] <dbg> zmk.zmk_keymap_apply_position_state: layer: 0 position: 0, binding name: KEY_PRESS
[00:13:21.169,036] <dbg> zmk.on_keymap_binding_pressed: position 0 keycode 0x7001d
[00:13:21.169,067] <dbg> zmk.hid_listener_keycode_pressed: usage_page 0x07 keycode 0x1d implicit_mods 0x00 explicit_mods 0x00
[00:13:21.169,067] <dbg> zmk.zmk_hid_implicit_modifiers_press: Modifiers set to 0x00
[00:13:21.169,067] <dbg> zmk.zmk_endpoints_send_report: usage page 0x07
[00:13:21.315,826] <dbg> zmk.kscan_gpio_read: Sending event at 0,0 state off
[00:13:21.315,856] <dbg> zmk.zmk_kscan_process_msgq: Row: 0, col: 0, position: 0, pressed: false

[00:13:21.315,917] <dbg> zmk.position_state_changed_listener: 0 bubble (no undecided hold_tap active)
[00:13:21.315,917] <dbg> zmk.zmk_keymap_apply_position_state: layer: 0 position: 0, binding name: KEY_PRESS
[00:13:21.315,948] <dbg> zmk.on_keymap_binding_released: position 0 keycode 0x7001d
[00:13:21.315,979] <dbg> zmk.hid_listener_keycode_released: usage_page 0x07 keycode 0x1d implicit_mods 0x00 explicit_mods 0x00
[00:13:21.315,979] <dbg> zmk.zmk_hid_implicit_modifiers_release: Modifiers set to 0x00
[00:13:21.315,979] <dbg> zmk.zmk_endpoints_send_report: usage page 0x07
[00:13:23.884,918] <dbg> zmk.kscan_gpio_read: Sending event at 0,1 state on
[00:13:23.884,979] <dbg> zmk.zmk_kscan_process_msgq: Row: 0, col: 1, position: 1, pressed: true

[00:13:23.885,009] <dbg> zmk.position_state_changed_listener: 1 bubble (no undecided hold_tap active)
[00:13:23.885,009] <dbg> zmk.zmk_keymap_apply_position_state: layer: 0 position: 1, binding name: KEY_PRESS
[00:13:23.885,040] <dbg> zmk.on_keymap_binding_pressed: position 1 keycode 0x7001b
[00:13:23.885,070] <dbg> zmk.hid_listener_keycode_pressed: usage_page 0x07 keycode 0x1b implicit_mods 0x00 explicit_mods 0x00
[00:13:23.885,070] <dbg> zmk.zmk_hid_implicit_modifiers_press: Modifiers set to 0x00
[00:13:23.885,070] <dbg> zmk.zmk_endpoints_send_report: usage page 0x07
[00:13:24.016,662] <dbg> zmk.kscan_gpio_read: Sending event at 0,1 state off
[00:13:24.016,693] <dbg> zmk.zmk_kscan_process_msgq: Row: 0, col: 1, position: 1, pressed: false

[00:13:24.016,754] <dbg> zmk.position_state_changed_listener: 1 bubble (no undecided hold_tap active)
[00:13:24.016,754] <dbg> zmk.zmk_keymap_apply_position_state: layer: 0 position: 1, binding name: KEY_PRESS
[00:13:24.016,784] <dbg> zmk.on_keymap_binding_released: position 1 keycode 0x7001b
[00:13:24.016,815] <dbg> zmk.hid_listener_keycode_released: usage_page 0x07 keycode 0x1b implicit_mods 0x00 explicit_mods 0x00
[00:13:24.016,815] <dbg> zmk.zmk_hid_implicit_modifiers_release: Modifiers set to 0x00
[00:13:24.016,815] <dbg> zmk.zmk_endpoints_send_report: usage page 0x07

@aaron-nunley aaron-nunley marked this pull request as draft February 18, 2021 05:45
@aaron-nunley aaron-nunley marked this pull request as ready for review February 18, 2021 05:46
@dxmh dxmh added enhancement New feature or request shields PRs and issues related to shields labels Sep 23, 2021
@petejohanson
Copy link
Copy Markdown
Contributor

Thank you, contributor, for your patience with how long review and merge of boards/shields has taken!

There are three recent refactors/changes to boards and shields that require some attention, and then we can finally get this PR merged!

  1. Hardware Metadata
  2. Pro Micro shield DT naming changes
  3. Split changes for BLE advertising

Hardware Metadata

The Problem

When first developing the process around contributing new shields/boards to ZMK, we failed to recognize that several key files (setup scripts, documentation page of supported hardware, and GH Action build.yml file) required changes, often in the same spot, for every PR. This resulted in immediate merge conflicts for every other PR after one was merged, which is a headache for contributors.

The Fix

By adding discrete metadata files that are located with the boards/shields in question, and using that metadata to generate setup scripts, website hardware list, etc., users can contributing new hardware descriptions without the need to change the same files that other contributors are changing.

Next Steps

First, refer to https://zmk.dev/docs/development/hardware-metadata-files to familiarize yourself with the new metadata file format.

Next, you have two options for fixing up your PR:

  1. If comfortable with git rebase, perform an interactive rebase and revert any changes to build.yml, hardware.md, or the setup scripts setup.sh/setup.ps1, and then add the new metadata YAML file. Then force push your branch. Or,
  2. Create a new branch from an up-to-date main, copy in the files for your new hardware, add the metadata file, then commit and push the new branch. Then, edit your open PR to point to your new branch.

Pro Micro shield DT naming changes

In #876, we have simplified the DT naming for the "nexus node" we expose for pro-micro compatible boards, deprecating the use of pro_micro_a, and renaming pro_micro_d node to simply pro_micro. For pro-micro boards and shields, you'll need to adjust your DT to use the proper names.

Please see https://zmk.dev/docs/development/new-shield#shield-overlays for the updated docs on this.

Split Shield Advertising Changes

In addition, if this is a split PR, please see #658 where we have changed our conventions to remove the the name from the right sides, to prevent users attempting to pair with them and causing split sync issues. This also includes removing the " Left" suffix from the naming on the left side. See the changes in that PR for examples of what to change with your split shield.

Getting Help

If you have any questions about any of these changes, please comment here and tag @zmkfirmware/boards-shields or ask in the #boards-shields Discord channel.

@Nicell
Copy link
Copy Markdown
Member

Nicell commented Jan 30, 2022

Hello! We're closing this PR due to there being no activity since the metadata update to ZMK in September of last year. If you are still interested in updating this PR, please let us know, and we can reopen it and review your changes (hopefully a lot faster this time)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request shields PRs and issues related to shields

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants