diff --git a/Arduino/ODriveArduino/enums.h b/Arduino/ODriveArduino/ODriveEnums.h similarity index 99% rename from Arduino/ODriveArduino/enums.h rename to Arduino/ODriveArduino/ODriveEnums.h index 3794d602..c4ffccf1 100644 --- a/Arduino/ODriveArduino/enums.h +++ b/Arduino/ODriveArduino/ODriveEnums.h @@ -3,7 +3,7 @@ /* 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/arduino_enums_template.j2 --output Arduino/ODriveArduino/enums.h +** python Firmware/interface_generator_stub.py --definitions Firmware/odrive-interface.yaml --template tools/arduino_enums_template.j2 --output Arduino/ODriveArduino/ODriveEnums.h */ // ODrive.GpioMode diff --git a/Dockerfile b/Dockerfile index 5356399f..06bdadf1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ CMD \ python interface_generator_stub.py \ --definitions odrive-interface.yaml \ --template ../tools/arduino_enums_template.j2 \ - --output ../Arduino/ODriveArduino/enums.h && \ + --output ../Arduino/ODriveArduino/ODriveEnums.h && \ # Hack around Tup's dependency on FUSE tup init && \ tup generate build.sh && \ diff --git a/Firmware/Makefile b/Firmware/Makefile index bac32559..0f09b14c 100644 --- a/Firmware/Makefile +++ b/Firmware/Makefile @@ -32,7 +32,7 @@ all: @$(PY_CMD) ../tools/odrive/version.py --output autogen/version.c @tup --quiet -no-environ-check @$(PY_CMD) interface_generator_stub.py --definitions odrive-interface.yaml --template ../tools/enums_template.j2 --output ../tools/odrive/enums.py - @$(PY_CMD) interface_generator_stub.py --definitions odrive-interface.yaml --template ../tools/arduino_enums_template.j2 --output ../Arduino/ODriveArduino/enums.h + @$(PY_CMD) interface_generator_stub.py --definitions odrive-interface.yaml --template ../tools/arduino_enums_template.j2 --output ../Arduino/ODriveArduino/ODriveEnums.h # Copy libfibre files to odrivetool if they were built @ ! test -f "fibre-cpp/build/libfibre-linux-amd64.so" || cp fibre-cpp/build/libfibre-linux-amd64.so ../tools/odrive/pyfibre/fibre/ diff --git a/docs/developer-guide.md b/docs/developer-guide.md index f3b70fb9..0fd71c83 100644 --- a/docs/developer-guide.md +++ b/docs/developer-guide.md @@ -332,4 +332,4 @@ When filing a PR please go through this checklist: - Also, for each removed/moved/renamed API item use your IDE's search feature to search for occurrences of this name. Update the places you found (this will usually be documentation and test scripts). - If you added things to `odrive-interface.yaml` make sure the new things have decent documentation in the YAML file. We don't expect 100% coverage but use good sense of what to document. - Make sure your PR doesn't contain spurious changes that unnecessarily add or remove whitespace. These add noise and make the reviewer's lifes harder. - - If you changed any enums in `odrive-interface.yaml`, make sure you update [enums.py](../tools/odrive/enums.py) and [enums.h](../Arduino/ODriveArduino/enums.h). The file includes instructions on how to do this. Check the diff to verify that none of the existing enumerators changed their value. + - If you changed any enums in `odrive-interface.yaml`, make sure you update [enums.py](../tools/odrive/enums.py) and [ODriveEnums.h](../Arduino/ODriveArduino/ODriveEnums.h). The file includes instructions on how to do this. Check the diff to verify that none of the existing enumerators changed their value. diff --git a/tools/arduino_enums_template.j2 b/tools/arduino_enums_template.j2 index d7cb9cd7..9dadb270 100644 --- a/tools/arduino_enums_template.j2 +++ b/tools/arduino_enums_template.j2 @@ -3,7 +3,7 @@ /* 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/arduino_enums_template.j2 --output Arduino/ODriveArduino/enums.h +** python Firmware/interface_generator_stub.py --definitions Firmware/odrive-interface.yaml --template tools/arduino_enums_template.j2 --output Arduino/ODriveArduino/ODriveEnums.h */ [%- for _, enum in value_types.items() %]