qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

commit e9b36bebb2b6e4fa3c10da8b7b072f766dce49a5
parent df7b56e0ea91adbb04e19a7e904c062bbd46a79b
Author: Joel Challis <git@zvecr.com>
Date:   Fri,  7 Apr 2023 14:07:59 +0100

Avoid generating empty ENCODER_RESOLUTION (#20179)


Diffstat:
Mlib/python/qmk/cli/generate/config_h.py | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py @@ -119,7 +119,9 @@ def generate_encoder_config(encoder_json, config_h_lines, postfix=''): config_h_lines.append(generate_define(f'ENCODERS_PAD_B{postfix}', f'{{ {", ".join(b_pads)} }}')) if None in resolutions: - cli.log.debug("Unable to generate ENCODER_RESOLUTION configuration") + cli.log.debug(f"Unable to generate ENCODER_RESOLUTION{postfix} configuration") + elif len(resolutions) == 0: + cli.log.debug(f"Skipping ENCODER_RESOLUTION{postfix} configuration") elif len(set(resolutions)) == 1: config_h_lines.append(generate_define(f'ENCODER_RESOLUTION{postfix}', resolutions[0])) else: