Browse Source

Use slightly more unique data name

zvecr 4 years ago
parent
commit
e111b9d017

+ 1 - 1
data/templates/xap/docs/term_definitions.md.j2

@@ -3,6 +3,6 @@
 {%- for type, definition in xap.term_definitions | dictsort %}
 {%- for type, definition in xap.term_definitions | dictsort %}
 | _{{ type }}_ | {{ definition }} |
 | _{{ type }}_ | {{ definition }} |
 {%- endfor %}
 {%- endfor %}
-{%- for type, definition in xap.types | dictsort %}
+{%- for type, definition in xap.type_definitions | dictsort %}
 | _{{ definition.name }}_ | {{ definition.description }}{% if 'struct' == definition.type %} Takes the format:{% for item in definition.struct_members %}<br>`{{ item.type }}` - {{ item.name }}{%- endfor %}{% endif %} |
 | _{{ definition.name }}_ | {{ definition.description }}{% if 'struct' == definition.type %} Takes the format:{% for item in definition.struct_members %}<br>`{{ item.type }}` - {{ item.name }}{%- endfor %}{% endif %} |
 {%- endfor %}
 {%- endfor %}

+ 1 - 1
data/xap/xap_0.0.1.hjson

@@ -119,7 +119,7 @@
             '''
             '''
     }
     }
 
 
-    types: {
+    type_definitions: {
         identifier: {
         identifier: {
             name: ID
             name: ID
             description: A single octet / 8-bit byte, representing Subsystem or Route index.
             description: A single octet / 8-bit byte, representing Subsystem or Route index.

+ 1 - 1
lib/python/qmk/xap/gen_firmware/header_generator.py

@@ -126,7 +126,7 @@ def _append_types(lines, container):
     lines.append('')
     lines.append('')
 
 
     additional_types = {}
     additional_types = {}
-    types = container.get('types', {})
+    types = container.get('type_definitions', {})
     for key, value in types.items():
     for key, value in types.items():
         data_type = _get_c_type(value['type'])
         data_type = _get_c_type(value['type'])
         additional_types[key] = f'xap_{key}_t'
         additional_types[key] = f'xap_{key}_t'