Merge remote-tracking branch 'origin/develop' into xap

This commit is contained in:
QMK Bot 2022-07-26 16:38:14 +00:00
commit 545f7da5cd
12 changed files with 224 additions and 2 deletions

View File

@ -0,0 +1,33 @@
// Copyright 2022 Jason Williams (@wilba)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "config_common.h"
// USB Device descriptor parameter
#define VENDOR_ID 0x6582 // wilba.tech
#define PRODUCT_ID 0x0031 // PCB #49
#define DEVICE_VER 0x0001
#define MANUFACTURER wilba.tech
#define PRODUCT wilba.tech WT65-D
// key matrix size
#define MATRIX_ROWS 5
#define MATRIX_COLS 15
// Keyboard Matrix Assignments
#define MATRIX_ROW_PINS { E6, F0, F4, F6, F7 }
#define MATRIX_COL_PINS { F5, D5, D3, D2, B7, B0, B3, C7, C6, B6, B5, B4, D7, D6, D4 }
#define UNUSED_PINS
#define DIODE_DIRECTION COL2ROW
// Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed
#define DEBOUNCE 5
#define LED_CAPS_LOCK_PIN F1
// Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
#define LOCKING_SUPPORT_ENABLE
// Locking resynchronize hack
#define LOCKING_RESYNC_ENABLE

View File

@ -0,0 +1,10 @@
{
"keyboard_name": "wilba.tech WT65-D",
"url": "https://wilba.tech",
"maintainer": "Wilba",
"layouts": {
"LAYOUT_all": {
"layout": [{"label":"0,0", "x":0, "y":0}, {"label":"0,3", "x":1, "y":0}, {"label":"0,2", "x":2, "y":0}, {"label":"0,1", "x":3, "y":0}, {"label":"0,4", "x":4, "y":0}, {"label":"0,5", "x":5, "y":0}, {"label":"0,6", "x":6, "y":0}, {"label":"0,7", "x":7, "y":0}, {"label":"0,8", "x":8, "y":0}, {"label":"0,9", "x":9, "y":0}, {"label":"0,12", "x":10, "y":0}, {"label":"0,11", "x":11, "y":0}, {"label":"0,10", "x":12, "y":0}, {"label":"0,13", "x":13, "y":0}, {"label":"2,13", "x":14, "y":0}, {"label":"0,14", "x":15, "y":0}, {"label":"1,0", "x":0, "y":1, "w":1.5}, {"label":"1,1", "x":1.5, "y":1}, {"label":"1,2", "x":2.5, "y":1}, {"label":"1,3", "x":3.5, "y":1}, {"label":"1,4", "x":4.5, "y":1}, {"label":"1,5", "x":5.5, "y":1}, {"label":"1,6", "x":6.5, "y":1}, {"label":"1,7", "x":7.5, "y":1}, {"label":"1,8", "x":8.5, "y":1}, {"label":"1,9", "x":9.5, "y":1}, {"label":"1,10", "x":10.5, "y":1}, {"label":"1,11", "x":11.5, "y":1}, {"label":"1,12", "x":12.5, "y":1}, {"label":"1,13", "x":13.5, "y":1, "w":1.5}, {"label":"1,14", "x":15, "y":1}, {"label":"2,0", "x":0, "y":2, "w":1.75}, {"label":"2,1", "x":1.75, "y":2}, {"label":"2,2", "x":2.75, "y":2}, {"label":"2,3", "x":3.75, "y":2}, {"label":"2,4", "x":4.75, "y":2}, {"label":"2,5", "x":5.75, "y":2}, {"label":"2,6", "x":6.75, "y":2}, {"label":"2,7", "x":7.75, "y":2}, {"label":"2,8", "x":8.75, "y":2}, {"label":"2,9", "x":9.75, "y":2}, {"label":"2,10", "x":10.75, "y":2}, {"label":"2,11", "x":11.75, "y":2}, {"label":"2,12", "x":12.75, "y":2, "w":2.25}, {"label":"2,14", "x":15, "y":2}, {"label":"3,0", "x":0, "y":3, "w":1.25}, {"label":"3,1", "x":1.25, "y":3}, {"label":"3,2", "x":2.25, "y":3}, {"label":"3,3", "x":3.25, "y":3}, {"label":"3,4", "x":4.25, "y":3}, {"label":"3,5", "x":5.25, "y":3}, {"label":"3,6", "x":6.25, "y":3}, {"label":"3,7", "x":7.25, "y":3}, {"label":"3,8", "x":8.25, "y":3}, {"label":"3,9", "x":9.25, "y":3}, {"label":"3,10", "x":10.25, "y":3}, {"label":"3,11", "x":11.25, "y":3}, {"label":"3,12", "x":12.25, "y":3, "w":1.75}, {"label":"3,13", "x":14, "y":3}, {"label":"3,14", "x":15, "y":3}, {"label":"4,0", "x":0, "y":4, "w":1.25}, {"label":"4,1", "x":1.25, "y":4}, {"label":"4,2", "x":2.25, "y":4, "w":1.25}, {"label":"4,3", "x":3.5, "y":4, "w":6}, {"label":"4,9", "x":9.5, "y":4, "w":1.25}, {"label":"4,10", "x":10.75, "y":4}, {"label":"4,11", "x":11.75, "y":4, "w":1.25}, {"label":"4,12", "x":13, "y":4}, {"label":"4,13", "x":14, "y":4}, {"label":"4,14", "x":15, "y":4}]
}
}
}

View File

@ -0,0 +1,40 @@
// Copyright 2022 Jason Williams (@wilba)
// SPDX-License-Identifier: GPL-2.0-or-later
// Default layout for WT65-D
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Default layer
[0] = LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
// Fn1 Layer
[1] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
// Fn2 Layer
[2] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
// Fn3 Layer
[3] = LAYOUT_all(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
};

View File

@ -0,0 +1 @@
#include "../default/keymap.c"

View File

@ -0,0 +1 @@
VIA_ENABLE = yes

View File

@ -0,0 +1,25 @@
# wilba.tech WT65-D
WT65-D is a keyboard PCB supporting 65% layout. [More info at wilba.tech](https://wilba.tech/)
* Keyboard Maintainer: [wilba](https://github.com/wilba)
* Hardware Supported: wilba.tech WT65-D
* Hardware Availability: [wilba.tech](https://wilba.tech/)
Make example for this keyboard (after setting up your build environment):
make wilba_tech/wt65_d:default
Flashing example for this keyboard:
make wilba_tech/wt65_d:default:flash
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
## Bootloader
Enter the bootloader in 3 ways:
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
* **Keycode in layout**: Press the key mapped to `RESET` if it is available

View File

@ -0,0 +1,18 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output

View File

@ -0,0 +1,4 @@
// Copyright 2022 Jason Williams (@wilba)
// SPDX-License-Identifier: GPL-2.0-or-later
#include "wt65_d.h"

View File

@ -0,0 +1,23 @@
// Copyright 2022 Jason Williams (@wilba)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "quantum.h"
#define ____ KC_NO
#define LAYOUT_all( \
K000, K003, K002, K001, K004, K005, K006, K007, K008, K009, K012, K011, K010, K013, K213, K014, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \
K400, K401, K402, K403, K409, K410, K411, K412, K413, K414 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \
{ K400, K401, K402, K403, ____, ____, ____, ____, ____, K409, K410, K411, K412, K413, K414 } \
}

View File

@ -11,7 +11,7 @@ from milc.questions import yesno
from qmk import submodules from qmk import submodules
from qmk.constants import QMK_FIRMWARE, QMK_FIRMWARE_UPSTREAM from qmk.constants import QMK_FIRMWARE, QMK_FIRMWARE_UPSTREAM
from .check import CheckStatus, check_binaries, check_binary_versions, check_submodules from .check import CheckStatus, check_binaries, check_binary_versions, check_submodules
from qmk.git import git_check_repo, git_get_branch, git_get_tag, git_is_dirty, git_get_remotes, git_check_deviation from qmk.git import git_check_repo, git_get_branch, git_get_tag, git_get_last_log_entry, git_get_common_ancestor, git_is_dirty, git_get_remotes, git_check_deviation
from qmk.commands import in_virtualenv from qmk.commands import in_virtualenv
@ -66,10 +66,32 @@ def git_tests():
if git_branch in ['master', 'develop'] and git_deviation: if git_branch in ['master', 'develop'] and git_deviation:
cli.log.warning('{fg_yellow}The local "%s" branch contains commits not found in the upstream branch.', git_branch) cli.log.warning('{fg_yellow}The local "%s" branch contains commits not found in the upstream branch.', git_branch)
status = CheckStatus.WARNING status = CheckStatus.WARNING
for branch in [git_branch, 'upstream/master', 'upstream/develop']:
cli.log.info('- Latest %s: %s', branch, git_get_last_log_entry(branch))
for branch in ['upstream/master', 'upstream/develop']:
cli.log.info('- Common ancestor with %s: %s', branch, git_get_common_ancestor(branch, 'HEAD'))
return status return status
def output_submodule_status():
"""Prints out information related to the submodule status.
"""
cli.log.info('Submodule status:')
sub_status = submodules.status()
for s in sub_status.keys():
sub_info = sub_status[s]
if 'name' in sub_info:
sub_name = sub_info['name']
sub_shorthash = sub_info['shorthash'] if 'shorthash' in sub_info else ''
sub_describe = sub_info['describe'] if 'describe' in sub_info else ''
sub_last_log_timestamp = sub_info['last_log_timestamp'] if 'last_log_timestamp' in sub_info else ''
if sub_last_log_timestamp != '':
cli.log.info(f'- {sub_name}: {sub_last_log_timestamp} -- {sub_describe} ({sub_shorthash})')
else:
cli.log.error(f'- {sub_name}: <<< missing or unknown >>>')
@cli.argument('-y', '--yes', action='store_true', arg_only=True, help='Answer yes to all questions.') @cli.argument('-y', '--yes', action='store_true', arg_only=True, help='Answer yes to all questions.')
@cli.argument('-n', '--no', action='store_true', arg_only=True, help='Answer no to all questions.') @cli.argument('-n', '--no', action='store_true', arg_only=True, help='Answer no to all questions.')
@cli.subcommand('Basic QMK environment checks') @cli.subcommand('Basic QMK environment checks')
@ -129,6 +151,8 @@ def doctor(cli):
elif sub_ok == CheckStatus.WARNING and status == CheckStatus.OK: elif sub_ok == CheckStatus.WARNING and status == CheckStatus.OK:
status = CheckStatus.WARNING status = CheckStatus.WARNING
output_submodule_status()
# Report a summary of our findings to the user # Report a summary of our findings to the user
if status == CheckStatus.OK: if status == CheckStatus.OK:
cli.log.info('{fg_green}QMK is ready to go') cli.log.info('{fg_green}QMK is ready to go')

View File

@ -62,6 +62,25 @@ def git_get_tag():
return git_tag.stdout.strip() return git_tag.stdout.strip()
def git_get_last_log_entry(branch_name):
"""Retrieves the last log entry for the branch being worked on.
"""
git_lastlog = cli.run(['git', '--no-pager', 'log', '--pretty=format:%ad (%h) -- %s', '--date=iso', '-n1', branch_name])
if git_lastlog.returncode == 0 and git_lastlog.stdout:
return git_lastlog.stdout.strip()
def git_get_common_ancestor(branch_a, branch_b):
"""Retrieves the common ancestor between for the two supplied branches.
"""
git_merge_base = cli.run(['git', 'merge-base', branch_a, branch_b])
git_branchpoint_log = cli.run(['git', '--no-pager', 'log', '--pretty=format:%ad (%h) -- %s', '--date=iso', '-n1', git_merge_base.stdout.strip()])
if git_branchpoint_log.returncode == 0 and git_branchpoint_log.stdout:
return git_branchpoint_log.stdout.strip()
def git_get_remotes(): def git_get_remotes():
"""Returns the current remotes for a repo. """Returns the current remotes for a repo.
""" """

View File

@ -11,7 +11,11 @@ def status():
{ {
'name': 'submodule_name', 'name': 'submodule_name',
'status': None/False/True, 'status': None/False/True,
'githash': '<sha-1 hash for the submodule> 'githash': '<sha-1 hash for the submodule>'
'shorthash': '<short hash for the submodule>'
'describe': '<output of `git describe --tags`>'
'last_log_message': 'log message'
'last_log_timestamp': 'timestamp'
} }
status is None when the submodule doesn't exist, False when it's out of date, and True when it's current status is None when the submodule doesn't exist, False when it's out of date, and True when it's current
@ -36,6 +40,26 @@ def status():
else: else:
raise ValueError('Unknown `git submodule status` sha-1 prefix character: "%s"' % status) raise ValueError('Unknown `git submodule status` sha-1 prefix character: "%s"' % status)
submodule_logs = cli.run(['git', 'submodule', '-q', 'foreach', 'git --no-pager log --pretty=format:"$sm_path%x01%h%x01%ad%x01%s%x0A" --date=iso -n1'])
for log_line in submodule_logs.stdout.split('\n'):
if not log_line:
continue
r = log_line.split('\x01')
submodule = r[0]
submodules[submodule]['shorthash'] = r[1] if len(r) > 1 else ''
submodules[submodule]['last_log_timestamp'] = r[2] if len(r) > 2 else ''
submodules[submodule]['last_log_message'] = r[3] if len(r) > 3 else ''
submodule_tags = cli.run(['git', 'submodule', '-q', 'foreach', 'echo -n "$sm_path "; git describe --tags'])
for log_line in submodule_tags.stdout.split('\n'):
if not log_line:
continue
r = log_line.split()
submodule = r[0]
submodules[submodule]['describe'] = r[1] if len(r) > 1 else ''
return submodules return submodules