Jelajahi Sumber

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

QMK Bot 4 tahun lalu
induk
melakukan
545f7da5cd

+ 33 - 0
keyboards/wilba_tech/wt65_d/config.h

@@ -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

File diff ditekan karena terlalu besar
+ 6 - 0
keyboards/wilba_tech/wt65_d/info.json


+ 40 - 0
keyboards/wilba_tech/wt65_d/keymaps/default/keymap.c

@@ -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),
+};

+ 1 - 0
keyboards/wilba_tech/wt65_d/keymaps/via/keymap.c

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

+ 1 - 0
keyboards/wilba_tech/wt65_d/keymaps/via/rules.mk

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

+ 25 - 0
keyboards/wilba_tech/wt65_d/readme.md

@@ -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

+ 18 - 0
keyboards/wilba_tech/wt65_d/rules.mk

@@ -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

+ 4 - 0
keyboards/wilba_tech/wt65_d/wt65_d.c

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

+ 23 - 0
keyboards/wilba_tech/wt65_d/wt65_d.h

@@ -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 }  \
+}
+

+ 25 - 1
lib/python/qmk/cli/doctor/main.py

@@ -11,7 +11,7 @@ from milc.questions import yesno
 from qmk import submodules
 from qmk.constants import QMK_FIRMWARE, QMK_FIRMWARE_UPSTREAM
 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
 
 
@@ -66,10 +66,32 @@ def git_tests():
                 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)
                     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
 
 
+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('-n', '--no', action='store_true', arg_only=True, help='Answer no to all questions.')
 @cli.subcommand('Basic QMK environment checks')
@@ -129,6 +151,8 @@ def doctor(cli):
         elif sub_ok == CheckStatus.WARNING and status == CheckStatus.OK:
             status = CheckStatus.WARNING
 
+    output_submodule_status()
+
     # Report a summary of our findings to the user
     if status == CheckStatus.OK:
         cli.log.info('{fg_green}QMK is ready to go')

+ 19 - 0
lib/python/qmk/git.py

@@ -62,6 +62,25 @@ def git_get_tag():
         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():
     """Returns the current remotes for a repo.
     """

+ 25 - 1
lib/python/qmk/submodules.py

@@ -11,7 +11,11 @@ def status():
         {
             'name': 'submodule_name',
             '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
@@ -36,6 +40,26 @@ def status():
         else:
             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
 
 

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini