Skip to content

Commit

Permalink
Merge pull request #6 from wb-Joy/gmmk_updates_and_v2
Browse files Browse the repository at this point in the history
Gmmk updates and v2
  • Loading branch information
Joy Lee authored Apr 14, 2022
2 parents bdbde18 + 685fe04 commit 7cb43b3
Show file tree
Hide file tree
Showing 1,670 changed files with 32,860 additions and 6,032 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/auto_approve.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Automatic Approve

on:
schedule:
- cron: "*/5 * * * *"

jobs:
automatic_approve:
runs-on: ubuntu-latest

if: github.repository == 'qmk/qmk_firmware'

steps:
- uses: mheap/automatic-approve-action@v1
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
workflows: "format.yml,lint.yml,unit_test.yml"
dangerous_files: "lib/python/,Makefile,paths.mk,builddefs/"
File renamed without changes.
9 changes: 1 addition & 8 deletions .github/workflows/develop_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- master


jobs:
develop_update:
runs-on: ubuntu-latest
Expand All @@ -15,21 +14,15 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
fetch-depth: 0

- name: Checkout develop
run: |
git fetch origin master develop
git checkout develop
- name: Check if branch locked
id: check_locked
uses: andstor/file-existence-action@v1
with:
files: ".locked"

- name: Update develop from master
if: steps.check_locked.outputs.files_exists == 'false'
run: |
git config --global user.name "QMK Bot"
git config --global user.email "hello@qmk.fm"
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/feature_branch_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Update feature branches after develop merge

on:
push:
branches:
- develop

jobs:
feature_branch_update:
runs-on: ubuntu-latest

if: github.repository == 'qmk/qmk_firmware'

strategy:
matrix:
branch:
- xap

steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.QMK_BOT_TOKEN }}
fetch-depth: 0

- name: Checkout branch
run: |
git fetch origin develop ${{ matrix.branch }}
git checkout ${{ matrix.branch }}
- name: Update branch from develop
run: |
git config --global user.name "QMK Bot"
git config --global user.email "hello@qmk.fm"
git merge origin/develop
git push origin ${{ matrix.branch }}
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,7 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
run: pip3 install -r requirements-dev.txt
- name: Run tests
run: make test:all
28 changes: 16 additions & 12 deletions builddefs/build_keyboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -159,22 +159,20 @@ ifneq ("$(wildcard $(KEYMAP_JSON))", "")

# Add rules to generate the keymap files - indentation here is important
$(KEYMAP_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
$(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
$(eval CMD=$(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON))
@$(BUILD_CMD)

$(KEYMAP_OUTPUT)/src/config.h: $(KEYMAP_JSON)
$(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_H)
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
$(eval CMD=$(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_H))
@$(BUILD_CMD)

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 @@ -326,13 +324,19 @@ endif
CONFIG_H += $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h

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

$(KEYBOARD_OUTPUT)/src/layouts.h: $(INFO_JSON_FILES)
$(QMK_BIN) generate-layouts --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/layouts.h
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
$(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

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

QUANTUM_PAINTER_ENABLE ?= no
ifeq ($(strip $(QUANTUM_PAINTER_ENABLE)), yes)
include $(QUANTUM_DIR)/painter/rules.mk
endif

VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi
EEPROM_DRIVER ?= vendor
ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
Expand Down Expand Up @@ -646,8 +651,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 @@ -695,7 +701,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
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
1 change: 1 addition & 0 deletions builddefs/message.mk
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ MSG_COMPILING_CXX = Compiling:
MSG_ASSEMBLING = Assembling:
MSG_CLEANING = Cleaning project:
MSG_CREATING_LIBRARY = Creating library:
MSG_GENERATING = Generating:
MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR) Some git submodules are out of date or modified.\n\
Please consider running $(BOLD)make git-submodule$(NO_COLOR).\n\n
MSG_NO_CMP = $(ERROR_COLOR)Error:$(NO_COLOR)$(BOLD) cmp command not found, please install diffutils\n$(NO_COLOR)
Expand Down
35 changes: 35 additions & 0 deletions data/mappings/defaults.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"development_board": {
"promicro": {
"processor": "atmega32u4",
"bootloader": "caterina",
"pin_compatible": "promicro"
},
"elite_c": {
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"pin_compatible": "promicro"
},
"proton_c": {
"processor": "STM32F303",
"bootloader": "stm32-dfu",
"board": "QMK_PROTON_C",
"pin_compatible": "promicro"
},
"bluepill": {
"processor": "STM32F103",
"bootloader": "stm32duino",
"board": "STM32_F103_STM32DUINO"
},
"blackpill_f401": {
"processor": "STM32F401",
"bootloader": "stm32-dfu",
"board": "BLACKPILL_STM32_F401"
},
"blackpill_f411": {
"processor": "STM32F411",
"bootloader": "stm32-dfu",
"board": "BLACKPILL_STM32_F411"
}
}
}
1 change: 1 addition & 0 deletions data/mappings/info_rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"MCU": {"info_key": "processor", "warn_duplicate": false},
"MOUSEKEY_ENABLE": {"info_key": "mouse_key.enabled", "value_type": "bool"},
"NO_USB_STARTUP_CHECK": {"info_key": "usb.no_startup_check", "value_type": "bool"},
"PIN_COMPATIBLE": {"info_key": "pin_compatible"},
"SPLIT_KEYBOARD": {"info_key": "split.enabled", "value_type": "bool"},
"SPLIT_TRANSPORT": {"info_key": "split.transport.protocol", "to_c": false},
"WAIT_FOR_USB": {"info_key": "usb.wait_for", "value_type": "bool"}
Expand Down
16 changes: 16 additions & 0 deletions data/schemas/definitions.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,22 @@
"type": "number",
"min": 0.25
},
"keyboard": {
"oneOf": [
{
"type": "string",
"enum": [
"converter/numeric_keypad_IIe",
"emptystring/NQG",
"maple_computing/christmas_tree/V2017"
]
},
{
"type": "string",
"pattern": "^[0-9a-z][0-9a-z_/]*$"
}
]
},
"mcu_pin_array": {
"type": "array",
"items": {"$ref": "#/mcu_pin"}
Expand Down
9 changes: 9 additions & 0 deletions data/schemas/keyboard.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@
"type": "object",
"properties": {
"keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"},
"keyboard_folder": {"$ref": "qmk.definitions.v1#/keyboard"},
"maintainer": {"$ref": "qmk.definitions.v1#/text_identifier"},
"manufacturer": {"$ref": "qmk.definitions.v1#/text_identifier"},
"url": {
"type": "string",
"format": "uri"
},
"development_board": {
"type": "string",
"enum": ["promicro", "elite_c", "proton_c", "bluepill", "blackpill_f401", "blackpill_f411"]
},
"pin_compatible": {
"type": "string",
"enum": ["promicro"]
},
"processor": {
"type": "string",
"enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66FX1M0", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F405", "STM32F407", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L412", "STM32L422", "STM32L432", "STM32L433", "STM32L442", "STM32L443", "GD32VF103", "WB32F3G71", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"]
Expand Down
3 changes: 2 additions & 1 deletion docs/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@

* Hardware Features
* Displays
* [HD44780 LCD Controller](feature_hd44780.md)
* [Quantum Painter](quantum_painter.md)
* [HD44780 LCD Driver](feature_hd44780.md)
* [ST7565 LCD Driver](feature_st7565.md)
* [OLED Driver](feature_oled_driver.md)
* Lighting
Expand Down
29 changes: 29 additions & 0 deletions docs/cli_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,23 @@ This command cleans up the `.build` folder. If `--all` is passed, any .hex or .b
qmk clean [-a]
```

## `qmk via2json`

This command an generate a keymap.json from a VIA keymap backup. Both the layers and the macros are converted, enabling users to easily move away from a VIA-enabled firmware without writing any code or reimplementing their keymaps in QMK Configurator.

**Usage**:

```
qmk via2json -kb KEYBOARD [-l LAYOUT] [-km KEYMAP] [-o OUTPUT] filename
```

**Example:**

```
$ qmk via2json -kb ai03/polaris -o polaris_keymap.json polaris_via_backup.json
Ψ Wrote keymap to /home/you/qmk_firmware/polaris_keymap.json
```

---

# Developer Commands
Expand Down Expand Up @@ -498,3 +515,15 @@ Run single test:

qmk pytest -t qmk.tests.test_cli_commands.test_c2json
qmk pytest -t qmk.tests.test_qmk_path

## `qmk painter-convert-graphics`

This command converts images to a format usable by QMK, i.e. the QGF File Format. See the [Quantum Painter](quantum_painter.md?id=quantum-painter-cli) documentation for more information on this command.

## `qmk painter-make-font-image`

This command converts a TTF font to an intermediate format for editing, before converting to the QFF File Format. See the [Quantum Painter](quantum_painter.md?id=quantum-painter-cli) documentation for more information on this command.

## `qmk painter-convert-font-image`

This command converts an intermediate font image to the QFF File Format. See the [Quantum Painter](quantum_painter.md?id=quantum-painter-cli) documentation for more information on this command.
2 changes: 2 additions & 0 deletions docs/config_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ If you define these options you will disable the associated feature, which can s

If you define these options you will enable the associated feature, which may increase your code size.

* `#define ENABLE_COMPILE_KEYCODE`
* Enables the `QK_MAKE` keycode
* `#define FORCE_NKRO`
* NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots.
* `#define STRICT_LAYER_RELEASE`
Expand Down
Loading

0 comments on commit 7cb43b3

Please sign in to comment.