Skip to content

Commit

Permalink
Ignore transport defaults if SPLIT_KEYBOARD is unset (qmk#16706)
Browse files Browse the repository at this point in the history
* Ignore transport defaults if SPLIT_KEYBOARD is unset

* keep exists check
  • Loading branch information
zvecr authored and zykrah committed Jul 2, 2022
1 parent cab4636 commit 58d5e12
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/python/qmk/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,16 @@ def _extract_split_transport(info_data, config_c):

info_data['split']['transport']['protocol'] = 'i2c'

elif 'protocol' not in info_data.get('split', {}).get('transport', {}):
# Ignore transport defaults if "SPLIT_KEYBOARD" is unset
elif 'enabled' in info_data.get('split', {}):
if 'split' not in info_data:
info_data['split'] = {}

if 'transport' not in info_data['split']:
info_data['split']['transport'] = {}

info_data['split']['transport']['protocol'] = 'serial'
if 'protocol' not in info_data['split']['transport']:
info_data['split']['transport']['protocol'] = 'serial'


def _extract_split_right_pins(info_data, config_c):
Expand Down

0 comments on commit 58d5e12

Please sign in to comment.