From b0621223bc53f634a28243b874379e8e157878fd Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 15 Feb 2022 01:42:58 +0000 Subject: [PATCH] Various fixes for new-keyboard (#16358) --- data/templates/keyboard/config.h | 20 ++++++++++++++++++++ data/templates/keyboard/info.json | 1 + lib/python/qmk/cli/new/keyboard.py | 10 +++++++++- lib/python/qmk/info.py | 1 + 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 data/templates/keyboard/config.h diff --git a/data/templates/keyboard/config.h b/data/templates/keyboard/config.h new file mode 100644 index 00000000000..b15c8d31f14 --- /dev/null +++ b/data/templates/keyboard/config.h @@ -0,0 +1,20 @@ +// Copyright %YEAR% %REAL_NAME% (@%USER_NAME%) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT diff --git a/data/templates/keyboard/info.json b/data/templates/keyboard/info.json index 92718faf3ae..41bc691313c 100644 --- a/data/templates/keyboard/info.json +++ b/data/templates/keyboard/info.json @@ -1,6 +1,7 @@ { "keyboard_name": "%KEYBOARD%", "maintainer": "%USER_NAME%", + "manufacturer": "%REAL_NAME%", "processor": "%MCU%", "bootloader": "%BOOTLOADER%", "diode_direction": "COL2ROW", diff --git a/lib/python/qmk/cli/new/keyboard.py b/lib/python/qmk/cli/new/keyboard.py index 8596994d385..6fa9ad5b2c4 100644 --- a/lib/python/qmk/cli/new/keyboard.py +++ b/lib/python/qmk/cli/new/keyboard.py @@ -208,7 +208,15 @@ def new_keyboard(cli): cli.log.error(f'Keyboard {{fg_cyan}}{kb_name}{{fg_reset}} already exists! Please choose a different name.') return 1 - tokens = {'YEAR': str(date.today().year), 'KEYBOARD': kb_name, 'USER_NAME': user_name, 'REAL_NAME': real_name, 'LAYOUT': default_layout, 'MCU': mcu, 'BOOTLOADER': bootloader} + tokens = { # Comment here is to force multiline formatting + 'YEAR': str(date.today().year), + 'KEYBOARD': kb_name, + 'USER_NAME': user_name, + 'REAL_NAME': real_name, + 'LAYOUT': default_layout, + 'MCU': mcu, + 'BOOTLOADER': bootloader + } if cli.config.general.verbose: cli.log.info("Creating keyboard with:") diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index 905f10ecc23..7e6f531f9c4 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -49,6 +49,7 @@ def info_json(keyboard): 'parse_errors': [], 'parse_warnings': [], 'maintainer': 'qmk', + 'manufacturer': 'qmk', } # Populate the list of JSON keymaps