*
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
|
||||
# TODO: This file is dangerous because the enums could potentially change between API versions. Should transmit as part of the JSON.
|
||||
# To regenerate this file, nagivate to the top level of the ODrive repository and run:
|
||||
# python Firmware/interface_generator_stub.py --definitions Firmware/odrive-interface.yaml --template tools/enums_template.j2 --output tools/odrive/enums.py
|
||||
|
||||
[%- for _, enum in value_types.items() %]
|
||||
[%- if enum.is_enum %]
|
||||
|
||||
# [[enum.fullname]]
|
||||
[%- for k, value in enum['values'].items() %]
|
||||
[[(((enum.parent.name if enum.name in ['Error', 'Mode'] else '') + enum.name + k) | to_macro_case).ljust(40)]] = [% if enum.is_flags %]0x[['%08x' | format(value.value)]][% else %][[value.value]][% endif %]
|
||||
[%- endfor %]
|
||||
[%- endif %]
|
||||
[%- endfor %]
|
||||
|
||||
Reference in New Issue
Block a user