Tidy up python client

This commit is contained in:
zvecr
2022-07-17 22:02:26 +01:00
parent e9ec212376
commit ca8af27673
4 changed files with 68 additions and 57 deletions
@@ -1,9 +1,10 @@
# TODO: assumption of only one level of children
class XAPRoutes():
{%- for id, route in xap.routes | dictsort %}
{%- if route.routes %}
# {{route.define}}
# {{route.define}}
{%- for subid, subroute in route.routes | dictsort %}
{{route.define}}_{{subroute.define}} = b'\x{{ '%02d' % id|int(base=16) }}\x{{ '%02d' % subid|int(base=16) }}'
{{route.define}}_{{subroute.define}} = b'\x{{ '%02d' % id|int(base=16) }}\x{{ '%02d' % subid|int(base=16) }}'
{%- endfor %}
{%- endif %}
{%- endfor %}