Skip to content

Commit

Permalink
Merge branch 'qmk-zq' into air32_protocol_test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaqian12 authored Jun 23, 2022
2 parents ba1c198 + d961f26 commit 8c71b75
Show file tree
Hide file tree
Showing 3,527 changed files with 41,911 additions and 13,183 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
58 changes: 0 additions & 58 deletions .github/stale.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_KEY }}
AWS_S3_ENDPOINT: https://nyc3.digitaloceanspaces.com
SOURCE_DIR: 'api_data'
SOURCE_DIR: '.build/api_data'
6 changes: 4 additions & 2 deletions .github/workflows/develop_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ jobs:
persist-credentials: false

- name: Generate API Data
run: qmk generate-api
run: |
python3 -m pip install -r requirements-dev.txt
qmk generate-api
- name: Upload API Data
uses: jakejarvis/s3-sync-action@master
Expand All @@ -35,4 +37,4 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.SPACES_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET_KEY }}
AWS_S3_ENDPOINT: https://nyc3.digitaloceanspaces.com
SOURCE_DIR: 'api_data'
SOURCE_DIR: '.build/api_data'
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
with:
fetch-depth: 0

- name: Install dependencies
run: pip3 install -r requirements-dev.txt

- uses: trilom/file-changes-action@v1.2.4
id: file_changes
with:
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'
workflow_dispatch:

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

remove-stale-when-updated: true
exempt-draft-pr: true
ascending: true
operations-per-run: 150

stale-issue-label: stale
days-before-issue-stale: 90
days-before-issue-close: 30
exempt-issue-labels: bug,in progress,on hold,discussion,to do

stale-issue-message: >
This issue has been automatically marked as stale because it has not had activity in the
last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity
occurs.
For maintainers: Please label with `bug`, `in progress`, `on hold`, `discussion` or `to do` to prevent
the issue from being re-flagged.
close-issue-message: >
This issue has been automatically closed because it has not had activity in the last 30 days.
If this issue is still valid, re-open the issue and let us know.
// [stale-action-closed]
stale-pr-label: stale
days-before-pr-stale: 45
days-before-pr-close: 30
exempt-pr-labels: bug,awaiting review,breaking_change,in progress,on hold

stale-pr-message: >
Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had
activity in the last 45 days. It will be closed in 30 days if no further activity occurs.
Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with `bug`, `awaiting review`, `breaking_change`, `in progress`, or `on hold`
to prevent the issue from being re-flagged.
close-pr-message: >
Thank you for your contribution!
This pull request has been automatically closed because it has not had activity in the last 30 days.
Please feel free to give a status update now, ping for review, or re-open when it's ready.
// [stale-action-closed]
4 changes: 3 additions & 1 deletion .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ jobs:
test:
runs-on: ubuntu-latest

container: qmkfm/base_container
container: qmkfm/qmk_cli

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
run: pip3 install -r requirements-dev.txt
- name: Run tests
run: make test:all
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,12 @@ CMakeLists.txt
.vscode/temp.sql
tags

# Ignore image files
# Ignore image/font files
*.gif
*.jpg
*.png
*.ttf
*.otf

# Things Travis sees
/.vs
Expand Down
1 change: 0 additions & 1 deletion api_data/_config.yml

This file was deleted.

4 changes: 4 additions & 0 deletions builddefs/bootloader.mk
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ ifeq ($(strip $(BOOTLOADER)), md-boot)
OPT_DEFS += -DBOOTLOADER_MD_BOOT
BOOTLOADER_TYPE = md_boot
endif
ifeq ($(strip $(BOOTLOADER)), wb32-dfu)
OPT_DEFS += -DBOOTLOADER_WB32_DFU
BOOTLOADER_TYPE = wb32_dfu
endif

ifeq ($(strip $(BOOTLOADER_TYPE)),)
$(call CATASTROPHIC_ERROR,Invalid BOOTLOADER,No bootloader specified. Please set an appropriate 'BOOTLOADER' in your keyboard's 'rules.mk' file.)
Expand Down
16 changes: 8 additions & 8 deletions builddefs/build_keyboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,7 @@ generated-files: $(KEYMAP_OUTPUT)/src/config.h $(KEYMAP_OUTPUT)/src/keymap.c

endif

ifeq ($(strip $(CTPC)), yes)
CONVERT_TO_PROTON_C=yes
endif

ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
include platforms/chibios/boards/QMK_PROTON_C/convert_to_proton_c.mk
endif
include $(BUILDDEFS_PATH)/converters.mk

include $(BUILDDEFS_PATH)/mcu_selection.mk

Expand Down Expand Up @@ -328,12 +322,18 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_5)/info.json)","")
endif

CONFIG_H += $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h
KEYBOARD_SRC += $(KEYBOARD_OUTPUT)/src/default_keyboard.c

$(KEYBOARD_OUTPUT)/src/info_config.h: $(INFO_JSON_FILES)
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
$(eval CMD=$(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_config.h)
@$(BUILD_CMD)

$(KEYBOARD_OUTPUT)/src/default_keyboard.c: $(INFO_JSON_FILES)
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
$(eval CMD=$(QMK_BIN) generate-keyboard-c --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/default_keyboard.c)
@$(BUILD_CMD)

$(KEYBOARD_OUTPUT)/src/default_keyboard.h: $(INFO_JSON_FILES)
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
$(eval CMD=$(QMK_BIN) generate-keyboard-h --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/default_keyboard.h)
Expand All @@ -344,7 +344,7 @@ $(KEYBOARD_OUTPUT)/src/layouts.h: $(INFO_JSON_FILES)
$(eval CMD=$(QMK_BIN) generate-layouts --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/layouts.h)
@$(BUILD_CMD)

generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/default_keyboard.h $(KEYBOARD_OUTPUT)/src/layouts.h
generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/default_keyboard.c $(KEYBOARD_OUTPUT)/src/default_keyboard.h $(KEYBOARD_OUTPUT)/src/layouts.h

.INTERMEDIATE : generated-files

Expand Down
2 changes: 2 additions & 0 deletions builddefs/build_test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ endif

.DEFAULT_GOAL := all

OPT = g

include paths.mk
include $(BUILDDEFS_PATH)/message.mk

Expand Down
6 changes: 4 additions & 2 deletions builddefs/common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,9 @@ ifeq ($(strip $(HAPTIC_ENABLE)),yes)
endif

ifeq ($(strip $(HD44780_ENABLE)), yes)
SRC += platforms/avr/drivers/hd44780.c
OPT_DEFS += -DHD44780_ENABLE
COMMON_VPATH += $(DRIVER_PATH)/lcd
SRC += hd44780.c
endif

VALID_OLED_DRIVER_TYPES := SSD1306 custom
Expand Down Expand Up @@ -705,7 +706,8 @@ endif

ifeq ($(strip $(UNICODE_COMMON)), yes)
OPT_DEFS += -DUNICODE_COMMON_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c \
$(QUANTUM_DIR)/utf8.c
endif

MAGIC_ENABLE ?= yes
Expand Down
6 changes: 3 additions & 3 deletions builddefs/common_rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ endif
# -Wall...: warning level
# -Wa,...: tell GCC to pass this to the assembler.
ifeq ($(strip $(LTO_ENABLE)), yes)
ifeq ($(PLATFORM),CHIBIOS)
$(info Enabling LTO on ChibiOS-targeting boards is known to have a high likelihood of failure.)
ifeq ($(PLATFORM),ARM_ATSAM)
$(info Enabling LTO on arm_atsam-targeting boards is known to have a high likelihood of failure.)
$(info If unsure, set LTO_ENABLE = no.)
endif
CDEFS += -flto
Expand Down Expand Up @@ -316,7 +316,7 @@ gccversion :
@$(BUILD_CMD)

%.uf2: %.hex
$(eval CMD=$(UF2CONV) $(BUILD_DIR)/$(TARGET).hex -o $(BUILD_DIR)/$(TARGET).uf2 -c -f $(UF2_FAMILY) >/dev/null 2>&1)
$(eval CMD=$(UF2CONV) $(BUILD_DIR)/$(TARGET).hex --output $(BUILD_DIR)/$(TARGET).uf2 --convert --family $(UF2_FAMILY) >/dev/null 2>&1)
#@$(SILENT) || printf "$(MSG_EXECUTING) '$(CMD)':\n"
@$(SILENT) || printf "$(MSG_UF2) $@" | $(AWK_CMD)
@$(BUILD_CMD)
Expand Down
37 changes: 37 additions & 0 deletions builddefs/converters.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Note for new boards -- CTPC and CONVERT_TO_PROTON_C are deprecated terms
# and should not be replicated for new boards. These will be removed from
# documentation as well as existing keymaps in due course.
ifeq ($(strip $(CTPC)), yes)
CONVERT_TO_PROTON_C=yes
endif
ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
CONVERT_TO=proton_c

cpfirmware: ctpc_warning
.INTERMEDIATE: ctpc_warning
ctpc_warning: elf
$(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@)
$(info The `CONVERT_TO_PROTON_C` and `CTPC` options are soon to be deprecated.)
$(info Boards should be changed to use `CONVERT_TO=proton_c` instead.)
$(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@)
endif

# TODO: opt in rather than assume everything uses a pro micro
PIN_COMPATIBLE ?= promicro
ifneq ($(CONVERT_TO),)
# glob to search each platfrorm and/or check for valid converter
CONVERTER := $(wildcard $(PLATFORM_PATH)/*/converters/$(PIN_COMPATIBLE)_to_$(CONVERT_TO)/)
ifeq ($(CONVERTER),)
$(call CATASTROPHIC_ERROR,Converting from '$(PIN_COMPATIBLE)' to '$(CONVERT_TO)' not possible!)
endif

TARGET := $(TARGET)_$(CONVERT_TO)

# Configure any defaults
OPT_DEFS += -DCONVERT_TO_$(strip $(shell echo $(CONVERT_TO) | tr '[:lower:]' '[:upper:]'))
OPT_DEFS += -DCONVERTER_ENABLED
VPATH += $(CONVERTER)

# Finally run any converter specific logic
include $(CONVERTER)/converter.mk
endif
3 changes: 3 additions & 0 deletions builddefs/generic_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ SPACE_CADET_ENABLE ?= yes
GRAVE_ESC_ENABLE ?= yes

GENERIC_FEATURES = \
CAPS_WORD \
COMBO \
COMMAND \
DEFERRED_EXEC \
Expand All @@ -25,12 +26,14 @@ GENERIC_FEATURES = \
DYNAMIC_KEYMAP \
DYNAMIC_MACRO \
ENCODER \
ENCODER_MAP \
GRAVE_ESC \
HAPTIC \
KEY_LOCK \
KEY_OVERRIDE \
LEADER \
PROGRAMMABLE_BUTTON \
SECURE \
SPACE_CADET \
SWAP_HANDS \
TAP_DANCE \
Expand Down
Loading

0 comments on commit 8c71b75

Please sign in to comment.