diff options
author | Joel Challis <git@zvecr.com> | 2024-01-06 13:16:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-06 13:16:23 +0000 |
commit | 71257e21e68d350c1c789a79440be8266be19788 (patch) | |
tree | 85f85bbc04f2a6627b38c3735308d791f202edd1 /lib | |
parent | ee3540e8dff9fdf436aad07f45f4fdacfe6626cb (diff) |
Generate true/false for _DEFAULT_ON options (#22829)
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/python/qmk/cli/generate/config_h.py | 2 | ||||
-rw-r--r-- | lib/python/qmk/info.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py index 00fb1d9585..fc681300a3 100755 --- a/lib/python/qmk/cli/generate/config_h.py +++ b/lib/python/qmk/cli/generate/config_h.py @@ -108,6 +108,8 @@ def generate_config_items(kb_info_json, config_h_lines): elif key_type.startswith('array'): config_h_lines.append(generate_define(config_key, f'{{ {", ".join(map(str, config_value))} }}')) elif key_type == 'bool': + config_h_lines.append(generate_define(config_key, 'true' if config_value else 'false')) + elif key_type == 'flag': if config_value: config_h_lines.append(generate_define(config_key)) elif key_type == 'mapping': diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index e960bf20ee..5500ecdd19 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -513,7 +513,7 @@ def _config_to_json(key_type, config_value): else: return list(map(str.strip, config_value.split(','))) - elif key_type == 'bool': + elif key_type in ['bool', 'flag']: if isinstance(config_value, bool): return config_value return config_value in true_values |