Skip to content

Commit

Permalink
Various fixes for new-keyboard (qmk#16358)
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr committed Feb 15, 2022
1 parent c9f192b commit b062122
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
20 changes: 20 additions & 0 deletions data/templates/keyboard/config.h
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions data/templates/keyboard/info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"keyboard_name": "%KEYBOARD%",
"maintainer": "%USER_NAME%",
"manufacturer": "%REAL_NAME%",
"processor": "%MCU%",
"bootloader": "%BOOTLOADER%",
"diode_direction": "COL2ROW",
Expand Down
10 changes: 9 additions & 1 deletion lib/python/qmk/cli/new/keyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:")
Expand Down
1 change: 1 addition & 0 deletions lib/python/qmk/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def info_json(keyboard):
'parse_errors': [],
'parse_warnings': [],
'maintainer': 'qmk',
'manufacturer': 'qmk',
}

# Populate the list of JSON keymaps
Expand Down

0 comments on commit b062122

Please sign in to comment.